Expand my Community achievements bar.

Formatting Text Field Value Properties with a List

Avatar

Level 2

Is there a way to format the value properties of a text field to automatically have a numbered list? Basically, when the user of the form starts typing in the text field, it begins with "1." and if they hit return, it automatically puts a "2."... etc.

8 Replies

Avatar

Level 10

Hi,

a text field will support this but Designers UI won't let you to setup the field this way.

The workaround is to select the textfield and editing it'S XML Source.

The XML source may look this way.


<field name="Textfield1" y="3.175mm" w="168.275mm" h="152.4mm" x="3.175mm">


            <ui>


               <textEdit multiLine="1">


                  <border>


                     <edge stroke="lowered"/>


                  </border>


                  <margin/>


               </textEdit>


            </ui>


            <font typeface="Arial"/>


            <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>


            <para widows="2" orphans="2"/>


            <caption reserve="25mm">


               <value>


                  <text>Textfield</text>


               </value>


            </caption>


         </field>


Now add (or replace if already there) the value portion.


<value>


    <exData contentType="text/html">


        <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><ol style="letter-spacing:0in"><li/></ol></body>


    </exData>


</value>


The complete XML strukture of the text field now looks this way.


<field name="Textfield1" y="3.175mm" w="168.275mm" h="152.4mm" x="3.175mm">


            <ui>


               <textEdit multiLine="1">


                  <border>


                     <edge stroke="lowered"/>


                  </border>


                  <margin/>


               </textEdit>


            </ui>


            <font typeface="Arial"/>


            <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>


            <para widows="2" orphans="2"/>


            <caption reserve="25mm">


               <value>


                  <text>Textfield</text>


               </value>


            </caption>


            <value>


               <exData contentType="text/html">


                  <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><ol style="letter-spacing:0in"><li/></ol></body>


               </exData>


            </value>


         </field>


As a result you're getting a field with an ordere list starting from 1.

The other method is to set the text field format to Rich Text and then tell the users that they can edit the content in manifold ways when fro the advanced text editor (press Ctrl + E).

Avatar

Level 2

Sorry I didn't get back to this until now, but it works great. Thanks!

Avatar

Level 2

Hi radzmar,

I've been asked if it is possible to move the numbered list all the way to the left of the field, instead of having the gap in front of it (as seen in the image below).

703055_pastedImage_0.png

Regards,

ZeroZone

Avatar

Level 2

I guess I would also like to know if when someone hits "Tab" to move to the next field (that also has the numbered list in it), can the cursor automatically show up behind the "1."? Currently the cursor shows up on the 2nd line and is all the way to the left as demonstrated below.

703063_pastedImage_1.png

Regards,

ZeroZone

Avatar

Level 10

I don't see a way to make any of your additional requests happen, sorry.

Avatar

Level 2

Ok, thanks radzmar.

I found one other problem. After I try to save the form as "Reader Enabled/Extended" in Acrobat Pro, the next time I open the form in Acrobat, the numbered lists disappear from the form completely. Do you know why that is or if there is a setting of some sort I need to change to prevent that?

Avatar

Level 2

Hi radzmar,

I was wondering if you knew why the numbered lists disappear once I save the form as "Reader Enabled"? Is there a way to fix this?

Best Regards,

Jessica