How to Dynamically Duplicate Form Fields in Adobe Acrobat Pro
Question details
The user wants to know how to use custom Acrobat JavaScript and templates to dynamically show, hide, or duplicate PDF form field groups based on user input values.

- Product
- Adobe Acrobat Pro
- Device & OS
- not provided
- Scenario
- Creating interactive PDF forms that adjust layout or field availability depending on user selections.
- Observed behavior
- Seeking a way to dynamically spawn or toggle fields, acknowledging that PDFs do not natively support dynamic content reflow.
Before attempting to duplicate or spawn form fields, ensure you have finalized the overall design and layout of your PDF form, as the PDF format does not support native dynamic content reflow.
Pre-arrange and Toggle Field Visibility with JavaScript
The easiest and most reliable method is to design your form with all possible fields hidden by default, then use JavaScript to reveal them based on user input.
Because the PDF format does not natively support dynamic content reflow (moving and shuffling objects automatically), dynamically injecting new fields can cause layout issues. Pre-arranging fields avoids this limitation.
Design your PDF form with the maximum number of required field groups pre-arranged on the page.
Name these field groups sequentially (e.g., Group1, Group2) for easier scripting and management.
Right-click the fields, open Properties, go to the General tab, and set their initial visibility to 'Hidden'.
Right-click the trigger field (the input field that dictates the change), go to Properties, and navigate to the Calculate or Actions tab.
Add a custom JavaScript calculation to toggle the visibility of the hidden fields (e.g., `getField("Group1").display = display.visible;`) based on the input condition.

Use Acrobat Page Templates for Major Layout Scaling
When you need to duplicate large sections of fields or entire pages (like adding an additional signer), use Acrobat's Page Templates feature.
Edit and Manage PDFs Easily with WPS Office
While advanced JavaScript form spawning is specific to Adobe Acrobat Pro, WPS Office offers a comprehensive, free, and lightweight PDF editor alongside its powerful Word, Excel, and PowerPoint alternatives. It is perfect for standard PDF editing, form filling, and document management.
- 1. Download WPS Office: Download and install WPS Office for free from the official website.
- 2. Open the PDF Editor: Launch WPS Office and click on 'PDF Edit' to access the dedicated PDF toolset.
- 3. Manage your documents: Open your PDF document to modify text, fill interactive forms, or manage pages easily.

Frequently Asked Questions
Can I dynamically reflow PDF text based on form input?
No, the PDF format does not natively support dynamic content reflow. Moving and shuffling objects based on user interaction is highly limited, which is why pre-arranging and hiding fields is the recommended approach.
Why is spawning individual form fields difficult in Acrobat?
Spawning and duplicating individual fields via JavaScript is advanced and tricky because it requires precise coordinate mapping and handling of field names, especially when duplicating fields across different pages.
How do I hide a form field by default in Adobe Acrobat?
Right-click the form field, select Properties, go to the General tab, and change the 'Form Field' property from 'Visible' to 'Hidden'.
What is the JavaScript command to spawn a page template?
You can use the command `this.getTemplate("YourTemplateName").spawn();` within a button's JavaScript action to generate a new page based on a saved template.




