[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 360
  • Last Modified:

Can you truncate long strings of text in a Notes feld

By default field widths are unlimited, if a field is in a table and a lot of text is written the table row is expanded.  

I don't want to restrict the field to only have x number of characters, but want the table to retain it's size with only the first portion of the text being displayed.

I have to consider too how the rest of the text would be viewed.

Is there any way of doing this?
0
nigelboyle
Asked:
nigelboyle
  • 2
  • 2
1 Solution
 
Bill-HansonCommented:
Sure.

In edit mode, use OS-style fields.  These have a width property that you can use to prevent wrapping or skewing your table.

In read mode, hide the editable fields and use a <Computed Value> element to display the text that was entered, but truncated it to prevent wrapping.

When the form is in edit mode, the <Computed Value> elements should be hidden.
0
 
nigelboyleAuthor Commented:
Thanks Bill, that helps, I understand your instruction.  I am having trouble with the hide on edit//read depending on the field though. As the fields are in one cell of a table, when I change the hide attributes of one, it changes the attributes of the other even though one is below the other.
0
 
Bill-HansonCommented:
The hide attributes apply to the current paragraph.  Paragraphs are delimited by the newline character.  So, all you need to do is place each element on it's own line inside a cell in order to show\hide the elements independently.

I hope this makes sense.  Here's an image showing what I mean.
table-example.gif
0
 
nigelboyleAuthor Commented:
Sorry Bill I missed a comment!  That all worked wonderfully - Thanks!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now