Skip to main content
Known Participant
January 13, 2017
Question

Is it possible for a fillable form user to click a button that will allow the entire page to copy to a new page?

  • January 13, 2017
  • 1 reply
  • 415 views

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.

This topic has been closed for replies.

1 reply

Inspiring
January 13, 2017

Yes for Acrobat and versions of Reader XI or newer using the template object and spawning templates.

Known Participant
January 13, 2017

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.

Inspiring
January 13, 2017

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.