Skip to main content
Participant
December 7, 2018
Answered

Trying to get Text Field name to change based on the page it's on

  • December 7, 2018
  • 2 replies
  • 837 views

Hey there,

I'm trying to set up a page within a PDF that I want to make multiple copies of.

The Text Fields' names on this page are unfortunately copied as well, resulting in multiple copies of the page, but I'm not able to edit each page's text fields separately (because they all have the same names)

Is there a way that the text field's name is pulled/changed based on what page in the document it is on? (example below)

This topic has been closed for replies.
Correct answer Thom Parker

There are a couple of solutions to this issue.

1. As Try67 suggests, turn the page into a "Page Template" and then use the "template.spawn" function to create new copies of the page with unique field names.

2. Use the "Duplicate Across Pages" menu item (right click when in forms mode) to create unique copies.

Here's one way to do this with your existing form

    1) Copy the page you want repeated and then delete all the fields from the copy

    2) Make copies of the page that doesn't have all the fields on it until you have enough pages

    3) Go back to the first page. Put Acrobat in Forms mode,

        a) Select all the fields

        b) Right click and select "Duplicate Across Pages" (shown below)

2 replies

Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
December 7, 2018

There are a couple of solutions to this issue.

1. As Try67 suggests, turn the page into a "Page Template" and then use the "template.spawn" function to create new copies of the page with unique field names.

2. Use the "Duplicate Across Pages" menu item (right click when in forms mode) to create unique copies.

Here's one way to do this with your existing form

    1) Copy the page you want repeated and then delete all the fields from the copy

    2) Make copies of the page that doesn't have all the fields on it until you have enough pages

    3) Go back to the first page. Put Acrobat in Forms mode,

        a) Select all the fields

        b) Right click and select "Duplicate Across Pages" (shown below)

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
try67
Community Expert
Community Expert
December 7, 2018

Only if you create them using a script.