PDF Editing Issues

Reset an Acrobat PDF Radio Button Group with JavaScript

John WilsonJohn Wilson Nov 19, 2026 868 views

Question details

Select the first radio button whenever a checkbox is clicked in a PDF form.

Reset an Acrobat PDF Radio Button Group with JavaScript
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A PDF form has a checkbox and a radio-button group named execution, with radio-button export values of 0 and 1.
Observed behavior
The desired result is for the radio button with export value 0 to be selected when the checkbox's Mouse Up action runs.
Before you start

Open the PDF in Adobe Acrobat and check that the radio-button group is named execution and that the first button's export value is 0. You need access to the checkbox's form field properties to add a JavaScript action.

Solution 1Recommended

Set the Radio Group Value in the Checkbox Mouse Up Action

Use the first radio button's export value to select it when the checkbox is clicked.

1
Open the form editor

In Acrobat, open the PDF and choose Prepare a form to access the form fields.

2
Open the checkbox action

Double-click the checkbox to open its properties, then select the Actions tab.

3
Add the JavaScript

Set Select Trigger to Mouse Up and Select Action to Run a JavaScript. Click Add and enter: this.getField("execution").value = "0";

4
Save and test

Confirm the script, close the properties, and save the PDF. Preview the form and click the checkbox to verify that the radio button with export value 0 is selected.

Set the Radio Group Value in the Checkbox Mouse Up Action
Match the field and export value: The field name and export value must match the form exactly. An off value clears the group rather than selecting the first button. Mouse Up responds to a mouse action and may not cover every way a checkbox can change.
Free Microsoft Office alternative

Work with PDF Documents in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Office documents. Its format compatibility makes it easy to move existing files into your workflow. Use Acrobat to configure and test the specific JavaScript form action described above.

Open and work with PDF documents alongside other office filesCompatible with Microsoft Office formats, including DOCX, XLSX, and PPTXFamiliar interface helps make migration straightforwardFree, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does the script use "0" instead of the first button's position?

Acrobat selects a radio button by the group's export value. Set this.getField("execution").value to "0" because that is the first button's export value in this form.

Where do I add the checkbox JavaScript in Acrobat?

Open Prepare a form, double-click the checkbox, and use the Actions tab. Select Mouse Up as the trigger and Run a JavaScript as the action, then click Add.

What should I check if the radio button is not selected?

In Prepare a form, check the radio group's field name and the first button's export value in its properties. They must match execution and 0 exactly for the example script to work.

Will Mouse Up run when the checkbox changes without a mouse click?

Not necessarily. Mouse Up is a mouse action, so test any keyboard or programmatic changes separately if the form must handle them.