PDF Editing Issues

How to Show Specific Dropdown Options When a Checkbox is Selected in Acrobat PDF

Aamir Naveed AkramAamir Naveed Akram Nov 3, 2026 869 views

Question details

The user needs a way to dynamically filter and display specific choices in a dropdown menu only when a particular checkbox is checked within a PDF form.

How to Show Specific Dropdown Options When a Checkbox Is Selected in PDF Forms
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Creating an interactive PDF form where dropdown list selections need to dynamically adjust based on user interaction with a checkbox (e.g., selecting specific tax rates when a checkbox is toggled).
Observed behavior
Currently, the dropdown displays all items simultaneously, rather than filtering and restricting the options dynamically based on the checkbox's state.
Before you start

Ensure you have access to a PDF editing tool that supports custom form field JavaScript authoring, and take note of the exact field names for both your checkbox and your dropdown menu.

Solution 1Recommended

Use JavaScript setItems() on the Checkbox Event

Apply custom JavaScript to the checkbox's Mouse Up event to dynamically redefine the items in the target dropdown field.

To achieve dynamic form behavior in Acrobat, you can bind a JavaScript action to the checkbox field. By listening to the event triggered when the checkbox state changes, you can use the setItems() method to replace the array of options currently loaded in the dropdown field.

1
Enter Form Editing Mode

Open your PDF document and launch the 'Prepare Form' tool to access form field properties.

2
Open Checkbox Properties

Right-click the target checkbox field and select 'Properties' from the context menu.

3
Add a JavaScript Action

Navigate to the 'Actions' tab. Select 'Mouse Up' as the Trigger, choose 'Run a JavaScript' as the Action, and click 'Add'.

4
Enter the JavaScript Code

In the editor, define your logic using the setItems() method. For example: var dropdown = this.getField("TaxRates"); if (event.target.value !== "Off") { dropdown.setItems([["Rate 1","rate1"],["Rate 2","rate2"]]); } else { dropdown.setItems([["Select a rate",""],["Rate 1","rate1"],["Rate 2","rate2"],["Rate 3","rate3"]]); }.

5
Save and Test

Click 'OK' to save the script, close the properties dialog, and exit the form editing mode to test the checkbox behavior.

Use JavaScript setItems() on the Checkbox Event
Field Names are Case-Sensitive: Make sure you replace "TaxRates" with the exact name of your dropdown field. JavaScript is strictly case-sensitive.
Free Microsoft Office alternative

A Powerful and Lightweight Alternative for Everyday PDF Needs

While advanced JavaScript form creation is typically handled by specialized tools like Adobe Acrobat Pro, WPS Office is an excellent, free alternative for filling interactive forms, editing PDFs, and managing all your office documents in one place.

  1. 1. Download and Install WPS Office: Visit the official WPS website, download the free version, and follow the standard installation prompts.
  2. 2. Open Your PDF Form: Launch WPS Office and click on 'Open' to select your PDF form document.
  3. 3. Fill and Save: Click directly on the interactive form fields to fill out your data, then save the document securely to your local drive or cloud.
Easily fill out interactive PDF forms and securely save your data without complex settings.Fully compatible with standard PDF formats as well as Microsoft Word, Excel, and PowerPoint files.Lightweight application that requires minimal system resources, ensuring fast document loading.Intuitive and unified interface making PDF and document tasks accessible for everyday users.
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't my dropdown update when I click the checkbox?

This usually happens if the JavaScript is applied to the wrong event or if the field names in the code do not perfectly match the names of the form fields. Ensure you attached the script to the 'Mouse Up' event and check for case sensitivity.

What does the setItems() method do in Acrobat JavaScript?

The setItems() method is used to programmatically replace the entire list of selectable options in a combo box or list box by passing an array containing the new display texts and their corresponding export values.

Can I use this JavaScript for multiple checkboxes controlling the same dropdown?

Yes, but you will need to add more complex conditional logic (like nested if/else statements) in your JavaScript to check the combined states of all relevant checkboxes before calling the setItems() method.