I would like to have some default text in a text field and have it on 3 separate lines in the text field. Is this possible?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
you can create a multiline default text with a manipulation of the value in the XML source.
1. Select you text field and enter your default text in the object palette
2. Got to XML source and look for the line with your default text
<value>
<text>This is my default text</text>
</value>
3. Enter this code 
 everywhere into the text, where a line break should appear.
<value>
<text>This 
is 
my 
default 
text</text>
</value>
The text field now shows, even it is not set up to display multiple lines.
This
is
my
default
text
Views
Replies
Total Likes
On the initialization event (this example uses formCalc)
$="Line #1
Line #2
Line #3"
You can use the unicode representations for the newline character, however, I hate looking them up and have found that they are not needed since they appear to be inserted invisibly when you enter scripts by keying the "enter key"
You will need to set the field up to allow multiple lines in the object tab.
Good luck!
Views
Replies
Total Likes
Hi,
you can create a multiline default text with a manipulation of the value in the XML source.
1. Select you text field and enter your default text in the object palette
2. Got to XML source and look for the line with your default text
<value>
<text>This is my default text</text>
</value>
3. Enter this code 
 everywhere into the text, where a line break should appear.
<value>
<text>This 
is 
my 
default 
text</text>
</value>
The text field now shows, even it is not set up to display multiple lines.
This
is
my
default
text
Views
Replies
Total Likes
Hi,
I know it's too late, but I can share something
In the default field in the property you can press combination keys after each line to create new line effect without going to the XML source.
These keys are: Ctrl+Enter
For example:
If you type in the Default field or in the Tool tip :
This <hit Ctrl+Enter> is <hit Ctrl+Enter> a <hit Ctrl+Enter> test
You should get this effect in the field or in its tool tip popup:
This
is
a
test
I hope this will save some key strokes and lower code maintenance.
BR,
Yasser
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies