Highlighted

merging PDF Form fields

New Here ,
Oct 08, 2020

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?

TOPICS
Acrobat SDK and JavaScript, Create PDFs, PDF forms

Views

85

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

merging PDF Form fields

New Here ,
Oct 08, 2020

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?

TOPICS
Acrobat SDK and JavaScript, Create PDFs, PDF forms

Views

86

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 08, 2020 0
Adobe Community Professional ,
Oct 08, 2020

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...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 08, 2020 0
New Here ,
Oct 09, 2020

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 09, 2020 0
Adobe Community Professional ,
Oct 09, 2020

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 09, 2020 1
New Here ,
Oct 09, 2020

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 09, 2020 0
New Here ,
Oct 09, 2020

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 09, 2020 0
Adobe Community Professional ,
Oct 09, 2020

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 09, 2020 0
Adobe Community Professional ,
Oct 09, 2020

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 09, 2020 0
New Here ,
Oct 09, 2020

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.

Traci5FC3_0-1602263797032.png

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 09, 2020 0