How to Create Dependent and Nested Drop-Down Lists in Adobe Acrobat PDF Forms
Question details
The user wants to create dynamic, dependent, and nested drop-down lists in a PDF form using JavaScript, where selecting an option in a parent list automatically updates the choices in a child list.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Building interactive PDF forms that require hierarchical data selection, such as choosing a brand category to reveal specific models in a secondary field.
- Observed behavior
- A functioning parent-child dropdown relationship where the child list clears, resets, and repopulates based on the parent list's active selection without creating unnecessary rows.
Ensure you are using Adobe Acrobat Pro or a PDF editor that supports Document JavaScripts, and verify that your parent and child drop-down fields are already created and uniquely named.
Use Custom JavaScript to Map Parent Selections to Child Options
The most effective method to create dependent drop-down lists is by using a JavaScript array map in the parent field's validation or calculation script.
By mapping parent choices to specific arrays of child options within a script, Acrobat can automatically clear and repopulate the dependent list. This ensures users only see options relevant to their initial selection, maintaining a clean form structure.
Open your PDF form in Adobe Acrobat. Go to 'Prepare Form' mode from the right-hand pane and ensure you have at least two Dropdown fields created: one for the parent (e.g., 'Brand') and one for the child (e.g., 'Model').
Right-click the parent drop-down field and select 'Properties'. Under the 'Options' tab, check the box for 'Commit selected value immediately'. This ensures the script triggers the moment a user makes a selection.
In the same Properties window for the parent field, go to the 'Format' or 'Validate' tab. Select 'Run custom validation script' and click 'Edit'. Enter a JavaScript object that maps your parent values to child arrays. For example: `var deptMap = { 'Brand A': ['Model 1', 'Model 2'], 'Brand B': ['Model 3'] };`.
Below your data map in the script editor, add the code to clear and populate the second field based on the selection: `if (event.value) { var childList = deptMap[event.value]; this.getField('Model').setItems(childList); } else { this.getField('Model').clearItems(); }`.

Edit and Fill PDF Forms Easily with WPS Office
While programming custom JavaScript in Acrobat can be highly complex, WPS Office provides an intuitive, user-friendly PDF editor. You can easily manage, edit, fill, and sign interactive PDF forms without writing any code. It serves as a powerful all-in-one suite for your daily document needs.
- 1. Open WPS PDF: Launch WPS Office and open your PDF document using the built-in PDF Editor.
- 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to access the suite of interactive form controls.
- 3. Add a Drop-Down Field: Click on 'Combo Box' or 'Drop-Down', place it on your document, and double-click the field to configure its list items and properties.
- 4. Save and Distribute: Once your form fields are set up, simply save the PDF. It is fully compatible and ready to be filled out by other users on any standard PDF reader.

Frequently Asked Questions
Can I create nested drop-down lists in Acrobat without using JavaScript?
No. In standard PDF forms, creating dynamic relationships where one field alters the available options of another requires custom JavaScript validation scripts to map and repopulate the fields.
Why isn't my dependent drop-down updating when I change the parent selection?
Ensure that the 'Commit selected value immediately' option is checked in the Options tab of your parent drop-down field's properties. Without this, the script will not trigger until the user clicks outside the drop-down box.
How do I handle empty or default selections in the parent list?
Your JavaScript should include an `if/else` statement that checks if the `event.value` is empty. If it is empty, use the `clearItems()` method on the child field to reset it to a blank state.
Will these JavaScript dropdowns work on mobile PDF readers?
Support for custom form JavaScript varies heavily by application. While they work reliably in desktop versions of Acrobat, many mobile PDF viewers, web browsers, and third-party apps disable or do not fully support JavaScript form validations.




