Copy link to clipboard
Copied
I have a PDF document with form fields that is 3 pages long. I have considered this my "Template". However, some users may need this template to extend up to 17 pages long sometimes and when I merge another page of course it duplicates because the form fields are the same name. How can I add similar pages but not have two particular form fields duplicate?
Copy link to clipboard
Copied
You can create template pages in a PDF using Acrobat. A template is really nothing more than a named page, and you have the option of hiding a template page (unless it is the only page in the document). Using JavaScript, you can add a new page to the document that is a duplicate of a template page using a process known as spawning a template. When you create a new page by spawning a template, you have the option of renaming the fields so that the fields on each added page are unique. The naming of the new fields fields follows a convention that is documented in the Acrobat SDK: https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FJS_Dev_Temp...
Copy link to clipboard
Copied
George,
The original file is a 3 page document and I want the last page to be a dummy that can be added if the user needs this document to more than 3 pages by just adding more pages. However, the body form field needs to be editable and not duplicate from what I copied. I am not sure if I need a template object or javascript for this action to occur. The users need to just be able to click and have pages inserted at the end as needed.
Copy link to clipboard
Copied
That's exactly what template pages and the associated JavaScript allow. Note that you can build a single new page by spawning multiple temlpate pages. This comes in handy when certain fields should be unique to the newly added page, and others need to be the same as others in the document. The documentation that I linked to above has more information and sample code, but if you get stuck, post again.
Copy link to clipboard
Copied
George,
So I think I have done everything I need to but my button is not displaying "Next Page" and I believe it is changing the the name of ALL the form fields instead of ONLY the BODY. I would like all form fields to duplicate but the Body needs to be editable to continue typing extra info in document if needed.
Copy link to clipboard
Copied
So I think I have done everything I need to but my button is not displaying "Next Page" and I believe it is changing the the name of ALL the form fields instead of ONLY the BODY. I would like all form fields to duplicate but the Body needs to be editable to continue typing extra info in document if needed.
Copy link to clipboard
Copied
How are you distinguishing between "all of the form fields" and "only the body", in terms of fields? Do you want to just change the name of one or more, but not all fields when you spawn a template?
Copy link to clipboard
Copied
Also, it might help if you could attach or link to a sample, or include a screen shot of the template page so we have a better idea of what you're dealing with.
Copy link to clipboard
Copied
I need you to see the document. Am I able to email it to you? I think I need everything to remain the same but the BODY. The body needs to be editable and a button there to click NEXT PAGE to create another page to continue typing.