How to Fix Acrobat JavaScript Drop-Down Value Reverting After Selection
Question details
The user needs to prevent a PDF form drop-down menu from reverting to its previous value immediately after a manual selection is made.

- Product
- PDF Forms
- Device & OS
- not provided
- Scenario
- Filling out or designing an interactive PDF form that uses JavaScript logic to link radio buttons and drop-down menus.
- Observed behavior
- The drop-down value changes back to its original state right after the user selects a new value, caused by a calculation script resetting the field whenever another form field changes.
Ensure you have access to the PDF form's editing mode and JavaScript settings before modifying field events.
Relocate the JavaScript to the Mouse Up Event
Prevents continuous recalculation by executing the script only when the controlling radio button is clicked, rather than every time the form updates.
If a script is placed in a drop-down's calculation event, it will continuously trigger and reset the value whenever any field on the form changes. You cannot have a field automatically calculate based on other fields and simultaneously allow manual user overrides without highly complex conditional logic.
Launch your PDF editor and enter the form editing or preparation mode to reveal all interactive fields.
Right-click the controlling field, such as the Payment Method radio buttons, and select Properties. Do not open the drop-down field's properties.
In the Properties window, click on the 'Actions' tab. Select 'Mouse Up' as the trigger behavior.
Choose 'Run a JavaScript' from the action list, click Add, and input your script utilizing 'var v = event.target.value;' to capture the clicked field's value. Ensure you remove the old script from the drop-down's calculation event.

Manage Interactive PDF Forms with WPS Office
WPS Office provides a comprehensive PDF editor that allows you to easily fill, create, and manage interactive PDF forms without dealing with complex script errors.
- 1. Open WPS PDF: Launch WPS Office and select the PDF tab to access the integrated PDF editor.
- 2. Open your document: Load the PDF document containing the interactive forms you need to modify.
- 3. Use the Form tab: Navigate to the 'Form' tab on the ribbon to edit, add, or customize drop-down menus, radio buttons, and text fields.
- 4. Save your changes: Save your updated PDF form directly to your local drive or cloud storage.

Frequently Asked Questions
Why does my PDF form field reset when I type in another field?
This happens because a calculation script is applied globally or to that specific field, forcing it to recalculate and reset its value whenever the form detects any update.
Can I have a drop-down calculate automatically and allow manual input?
Generally, no. You must choose one approach or write complex custom JavaScript logic that checks if a manual override has occurred before applying the calculation script.
What is the difference between Mouse Up and Calculation events in PDFs?
A Mouse Up event triggers only once when a user clicks and releases the mouse on that specific field, while a Calculation event triggers automatically every time any value in the entire form changes.




