Page 1 is the intro page that users will fill out initially. The optional middle page is an extension of some of the fields found on page 1 - it basically adds a page of new rows. This page contains calculations, which don't seem to duplicate. The last page is a signature page with different information on it. I made a button "Click to Add More Fields" on the first page and I am using this script to generate new pages:
var a = this.getTemplate("Add More Fields");a.spawn();
It seems like it works to generate the pages, but I'm having trouble with a few things.
1. The calculations don't copy over to the new pages, it just auto populates whatever I put on the first added page and when I change the numbers, the calculation is broken so the numbers don't add up. Is it even possible to use the template feature with calculations?
2. The new pages just copy all the info from the first spawned one - I want the user to start out on a fresh page each time rather than having to overwrite the info that auto populated.
3. I have some day and date code fields that I would like to be copies from the very first page so the user doesn't have to enter them on each new page.
4. New pages spawn at the end of the document... I would like them to spawn before the last (signature) page.
5. Is there a way to add page numbering that automatically adjusts based on the number of pages a user spawns?
Sorry for all the questions. If anyone has any input I would be grateful... I fear I'm a little out of my depth here, I've been reading for hours and it's not making much sense.
There are a number of things that you have to change. First, when spawning a new page, you have the option to rename the fields so they aren't the same as the template.
For the fields that you want to be copies, you can place them on a entirely separate hidden template all by themselves. After spawning the first template to create the new page, spawn this second on on top of the newly created page and don't rename the fields.
Adding page numbering is possible but the script can be complicated depending on how the form is set up, so it's hard to give specific help.
Have you read through this tutorial? Planet PDF - A Lesson in Templates for Adobe Acrobat