Copy link to clipboard
Copied
I have a fillable form that our salespeople fill out with specifics for a certain door that needs to be ordered. I would love for the salesperson to be able to click a button at the end of the document called "add another door" that will add another page exactly like the first. This new page, however, will have the customer information copied (name, address, etc), but the rest of the form fields will be cleared so that a new door can be filled in. The idea is that the salesperson can be at a customer's house and use one form to complete the necessary information for multiple doors at one address.
Thanks so much for your help.
Copy link to clipboard
Copied
Yes for Acrobat and versions of Reader XI or newer using the template object and spawning templates.
Copy link to clipboard
Copied
That's awesome. I actually think I just stumbled across your script to do this:
// Duplicate the current page
createTemplate("t1", pageNum).spawn({nPage: pageNum + 1, bOverlay: false});
removeTemplate("t1");
The problem is that I can't seem to figure out where to put it now. I have added a "add another door" button and put as an action under "run a javascript," but it's not working yet.
Copy link to clipboard
Copied
Have you tried the action for the button. You will create a copy of the form page including the field values and keeping the field names the same as the field names on the page will mean as you change the field values on the new page they will change on the source page.
Have you opened the Acrobat JavaScript console to see if there are any errors in your code. I find it is best to create a template for the page of a form I want to duplicate at a later date.
Copy link to clipboard
Copied
You may also encounter issues with your calculations using this approach.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now