How to Create Dynamic Pages and Conditional Lists in Acrobat PDF Forms
Question details
The user wants to configure a PDF form to dynamically show or hide specific pages based on a drop-down menu selection, and cleanly populate a visible list using items stored in a hidden source structure.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating advanced, interactive PDF forms that adapt their content and layout based on user input.
- Observed behavior
- The goal is to properly execute scripts that manage page visibility and compile dynamic conditional lists from hidden fields within the PDF.
Ensure you have access to Adobe Acrobat Pro to author and test form fields. Familiarity with Acrobat's JavaScript API is required to set up dynamic page templates and conditional logic.
Use Acrobat Form JavaScript to Spawn Pages and Populate Lists
Implement custom JavaScript within your PDF form's drop-down properties to control page templates and copy hidden data into visible list fields.
Standard PDF formats cannot natively 'hide' or 'show' standard pages on the fly without custom code. You must convert the pages you wish to hide into 'Templates', and then use JavaScript to spawn them dynamically when specific drop-down criteria are met.
Similarly, you can store your source items in hidden fields or within the script itself, using conditional statements to populate a visible list.
In Acrobat Pro, go to 'Tools' > 'Organize Pages'. Select the page you want to make dynamic, click 'More' > 'Page Templates', name the template, and hide it from the initial view.
Open 'Prepare Form' mode, right-click your trigger drop-down field, and select 'Properties'. Navigate to the 'Format' or 'Actions' tab to add a custom keystroke or calculation script.
Add a JavaScript action that checks the selected drop-down value. Use Acrobat API methods like this.getTemplate("YourTemplateName").spawn() to generate the page, or delete it if the selection changes.
Store your list items in a hidden form field or as arrays in your script. Use an 'if' or 'switch' statement in your drop-down's validation script to fetch those items and assign them to the target visible list field using this.getField("VisibleList").setItems(yourArray).

Create and Edit Interactive PDF Forms Easily with WPS Office
If you need a straightforward, coding-free way to build professional fillable forms, WPS Office provides a powerful built-in PDF editor. Easily insert text fields, check boxes, and drop-down menus without relying on complex JavaScript.
- 1. Open Your PDF in WPS Office: Launch WPS Office and open your existing PDF document or create a new blank PDF.
- 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to access interactive form controls.
- 3. Insert Drop-Down Menus: Click on 'Combo Box' or 'List Box' and drag out a rectangle on your page to place the field.
- 4. Configure Properties: Double-click the inserted field to open the Properties menu, where you can easily add your list items, rename the field, and customize its appearance.

Frequently Asked Questions
Can I dynamically hide fields instead of entire pages in a PDF form?
Yes, you can use Acrobat JavaScript to alter the display property of individual form fields. For example, using event.target.display = display.hidden will conceal the field based on user actions.
Does Adobe Reader support dynamic page creation from templates?
Adobe Reader can execute JavaScript to spawn pages from built-in templates, but only if the creator originally saved the PDF with extended usage rights enabled via Acrobat Pro.
How do I create a hidden source list in a PDF form?
In 'Prepare Form' mode, you can insert a standard text field or combo box, populate it with your source data, and then set its 'Form Field' property under the 'General' tab to 'Hidden'. It will store the data without being visible on the page.




