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.
Solved! Go to Solution.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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
Views
Replies
Total Likes
This worked like a charm!!! Thanks so much. I don't know what I would do without this forum to run to...
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies