How to Create Cascading Drop-Down Fields in an Acrobat PDF Form
Question details
The user needs to build a product order form in a PDF with dependent drop-down lists where selecting one item automatically filters the options in subsequent fields and calculates prices.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating a structured product order form requiring dependent attributes like item size, color, price, and quantity.
- Observed behavior
- The form requires dynamic selections to filter available values in related fields and calculate line totals based on user input and structured data.
Ensure you have access to Adobe Acrobat Pro or an advanced PDF editor that fully supports form creation and document-level JavaScript execution.
Use Document-Level JavaScript and Data Arrays
This solution involves formatting your Excel product data into JavaScript arrays and using document-level scripts to populate dependent fields.
To create cascading (or dependent) drop-down fields in a PDF, standard form properties are not enough. You must write custom JavaScript that stores your product database as structured arrays and dynamically updates target fields when the primary drop-down changes.
Convert your Excel product data (items, sizes, colors, prices) into a plain-text format. Structure this data into JavaScript arrays or JSON objects so the PDF script can easily parse it.
In Adobe Acrobat, go to 'Tools' > 'Prepare Form'. Click on 'More' (the three dots) in the right-hand pane and select 'Document JavaScripts'. Create a new script function that defines your product data arrays and the logic to populate dependent fields.
Right-click your main drop-down field (e.g., 'Item Selection') and select 'Properties'. Go to the 'Format' or 'Action' tab and add a custom Keystroke or Validate script that calls your document-level function to update the secondary fields (e.g., 'Size', 'Color').
For fields calculating the total, right-click the 'Total' field, go to 'Properties' > 'Calculate' tab. Choose 'Custom calculation script' and write a script to multiply the unit price (fetched from the JavaScript array based on selection) by the quantity field.
In the Properties of your primary drop-down fields, go to the 'Options' tab and check 'Commit selected value immediately'. This ensures the secondary drop-downs update as soon as the user makes a selection.

Create and Manage Interactive PDF Forms with WPS Office
While advanced cascading JavaScript requires coding expertise, WPS Office provides an intuitive, user-friendly interface for creating, editing, and filling standard interactive PDF forms effortlessly without needing to write complex code.
- 1. Open your PDF in WPS Office: Launch WPS Office and open the PDF document you want to convert into an interactive form.
- 2. Access Form Editing Tools: Navigate to the 'Form' tab on the top ribbon to reveal all interactive field options.
- 3. Add Drop-Down Lists: Click on the 'Combo Box' or 'Drop-down List' icon and draw the field onto your document.
- 4. Edit Field Properties: Double-click the new field to open its properties. Add your list items (e.g., sizes, colors) and configure appearance settings.
- 5. Save and Distribute: Once your fields are set, save the PDF. Your recipients can easily fill it out using WPS PDF or any standard PDF reader.

Frequently Asked Questions
Can I create cascading drop-down fields in a PDF without using JavaScript?
No, standard PDF form fields do not have built-in conditional logic to filter each other. Creating dependent or cascading drop-downs inherently requires JavaScript to listen for changes and populate the secondary fields based on the chosen value.
Why aren't my secondary drop-down values updating when I make a selection?
This usually happens if the primary drop-down field is not set to commit its value right away. Open the properties of your primary drop-down, navigate to the 'Options' tab, and ensure the 'Commit selected value immediately' box is checked.
How do I import an Excel spreadsheet into a PDF for form data?
You cannot directly link a live Excel spreadsheet to a PDF form for dynamic drop-downs. You must convert the Excel data into a plain-text format, structure it into a JSON object or JavaScript array, and embed that directly into the PDF's Document-Level JavaScript.
Do JavaScript-enabled PDF forms work on mobile devices?
Support varies heavily by application. While complex document-level JavaScript and cascading drop-downs work reliably in desktop applications like Adobe Acrobat and WPS Office, many mobile PDF viewers and web browser extensions strip out or ignore custom JavaScript, causing the form to break.




