Copy link to clipboard
Copied
Hello,
I am searching for the anser on the question "How do I create a button that inserts the same empty form on the next page, in my form?".
It's an inspection form with questions about an object.
When you see something that's not correct, then you need to fill that in.
If there are more then 1 incorrect parts, then the inspector needs to be able to click on a button which inserts a new page.
This new page has to be the exact same form.
How do I create the right button with the right script that adds the new page?
Copy link to clipboard
Copied
As noted you need to use templates. This feature has been available for a very long time.
A Lesson in Templates by Dave Wraight
I use the following steps to create a hidden template.
1. Create the form with fields. Include a button that will "spawn" a new page with the bRename parameter set to true.
2. Go to the Preview mode or ext the Prepare form tool and use the button to spawn a new page.
3. Use the Prepare From tool to rename all the fields on the spawned page from "P#.." to "P0.".
4. Make the template page Hidden.
This should allow the creation of new form pages with unique field names. If you are using any actions, you may need to adjust them if your are accessing any named fields for the unique field naming on the spawned pages.
Copy link to clipboard
Copied
You'll need to use a Page Template, and some JavaScript to spawn new pages.
If you have Acrobat DC Pro, then type "Page Template" into the tool search box. That's the easy part.
Here's the JS reference entry for the template spawn function. A couple of examples are provided.
Copy link to clipboard
Copied
As noted you need to use templates. This feature has been available for a very long time.
A Lesson in Templates by Dave Wraight
I use the following steps to create a hidden template.
1. Create the form with fields. Include a button that will "spawn" a new page with the bRename parameter set to true.
2. Go to the Preview mode or ext the Prepare form tool and use the button to spawn a new page.
3. Use the Prepare From tool to rename all the fields on the spawned page from "P#.." to "P0.".
4. Make the template page Hidden.
This should allow the creation of new form pages with unique field names. If you are using any actions, you may need to adjust them if your are accessing any named fields for the unique field naming on the spawned pages.
Copy link to clipboard
Copied
I am assuming that this method is only to copy the page once ? i wont be able to copy my new template ? as we have to do the same process for the 3rd copy ? how do we make it user friendly so that wheneever you need a extra template then you click the button and it will copy by changing form field names as well ? this would make things so much easier
Copy link to clipboard
Copied
You can spawn the page more then once.
Copy link to clipboard
Copied
You can spawn as many copies from the Template as you wish, and the field names on each one will be unique, but only if you spawn it to the end of the file, as the last page.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more