Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How do I add Bates numbering to a subform text?

Avatar

Level 3

Hi, all,

I have a dynamic pdf that adds another subform on a button click. I want the "Item #" to increase on each subform, ie "Item #1", button click, new subform "Item #2" etc. How can I do this?

Please explain the script slowly, JavaScript is not my friend.....

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

you can use a text with a floating field for this purpose.

1. Create a text object in the repeatable subform

2. Enter your text value "Item # ", set the text cursor to the position where you want to add a variable, open the contex menu (right click) and choose "Floating Field".

3. Select the floating field in the hierarchie tree and add the FormCalc script "$ = $.parent.index + 1" to its layoutReady:Event.

View solution in original post

4 Replies

Avatar

Level 7

Hi,

If all you need is to simply number a set of subforms, one way is to add a script to the initialize event of a field in the subform like:

     $ = Concat("Item #",$.parent.index + 1)

So what you are doing is,

     finding the index of the subform (remember indexes are zero-based) and

     adding 1 to it.

So the first subform will have an index of 0. Add 0 + 1 and you get 1. Then use the Concat function to make it read sensibly

     "Item #"   together with    $.parent.index + 1

makes:

     Item #1

This script is written in formCalc. You can use a "floating" field--depending on your needs.

Hope I haven't totally confused you. It's really easy.

Stephen

If you are wanting to do actual Bates Numbering, here is a link--I haven't read it, however you may find it helpful:

http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/bates_numbering.pdf

Message was edited by: kingphysh

Avatar

Correct answer by
Level 10

Hi,

you can use a text with a floating field for this purpose.

1. Create a text object in the repeatable subform

2. Enter your text value "Item # ", set the text cursor to the position where you want to add a variable, open the contex menu (right click) and choose "Floating Field".

3. Select the floating field in the hierarchie tree and add the FormCalc script "$ = $.parent.index + 1" to its layoutReady:Event.

Avatar

Level 7

Hi Radzmar--

One of the things I really like about a floating field is that it expands and occupies only the amount of space required to display the value assigned to it (it is very format friendly). And, as you point out, it eliminates the need for the Concat() function (which makes my suggestion a bit confusing).

Thanks,

Stephen

Avatar

Level 3

This worked like a charm!!! Thanks so much. I don't know what I would do without this forum to run to...