Expand my Community achievements bar.

Need help formatting text field default value

Avatar

Former Community Member

Hello,

I've received a customer request to put default text into the Value section of a text field. They're requesting that the default text include line breaks, bullets, etc. I added a Text Field object and added the default text to the Object tab > Value tab Default field but can't figure out how to add line breaks, etc.

Thanks in advance,

Saskia

3 Replies

Avatar

Former Community Member

in your paragraph options, change your spacing.

Avatar

Former Community Member

I am unable to highlight the text in the Value to apply paragraph properties to only a specific part of the text. Am I incorrectly in using Object > Value > Default to enter this text?

Avatar

Level 10

Hi,

this is possible but not doable with the UI of Designer.

The workaround is as follows:

1. Create a text, enter your default text with all the formattings you need (text color, bold text, line breaks etc.)

2. Create a text field and enter any word as default value. Let's say "Default".

3. Select the text and the switch to the XML Source view.

There you will find all the formatted text between the <value> tags such as:

<value>

     <exData contentType="text/html">

          <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><p style="letter-spacing:0in">This is<span style="xfa-spacerun:yes"> </span></p><p style="color:#ff0000;letter-spacing:0in">default Text</p><p style="letter-spacing:0in"><span style="xfa-spacerun:yes"> </span>• with<span style="xfa-spacerun:yes"> </span><span style="font-weight:bold">RichText</span> formatting.</p></body>

     </exData>

</value>

4. Select the whole code between the <value> tags and copy it to the clipboard (ctrl + c).

5. Go to the Design View, select the text field, go back to the XML Source view.

6. There you'll also find the value <tags> and your default value you entered before.

<value>

     <text>Default</text>

</value>

7. Select this code section and paste the value copied before to the clipboard by pressing ctrl + v.

8. That's it. When you now go back to the Design View your text field shows a formatted RichText as defaul text.