PDF Editing Issues

Fix Overwritten Radio-Button Choices in Acrobat JavaScript

John WilsonJohn Wilson Nov 19, 2026 869 views

Question details

Manage multiple text fields and radio-button choices without overwriting earlier selections or causing invalid-value errors.

Fix Overwritten Radio-Button Choices in Acrobat JavaScript
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A PDF form uses JavaScript to associate text-field values with radio-button choices.
Observed behavior
Later fields overwrite earlier values, and the form reports an invalid-value error.
Before you start

Open the PDF in desktop Acrobat and choose Prepare a form. Identify the text fields, radio-button group names, and export values you want the script to connect.

Solution 1Recommended

Check Radio-Button Group Names and Export Values

Use this check to find naming conflicts or values that do not match the available radio-button choices.

1
Inspect the group names

In Acrobat, open Prepare a form and double-click each radio button to open its properties. Buttons in one group share a field name; use a different group name for each independent set of choices.

2
Check the export values

In each radio button's Properties dialog, open the Options tab and record its export value. Confirm that the script assigns a value that exactly matches one of the choices in that group.

3
Compare the text-field names

Double-click each text field in Prepare a form and check its name in Properties. Update any script references so each text field points to its intended radio-button group.

4
Test in Acrobat

Save the form and test it in desktop Acrobat rather than a browser. If an error appears, open the JavaScript console and review the complete message and the field or script it identifies.

Free Microsoft Office alternative

Use WPS Office for Everyday PDF and Document Work

WPS Office is a free, lightweight alternative for working with PDFs and Office documents in a familiar interface. Its Microsoft Office format support makes it easy to bring existing files into your workflow, although it does not fix Acrobat-specific JavaScript errors.

Open and work with PDF documents alongside other office filesCompatible with Microsoft Word, Excel, and PowerPoint formatsUse a familiar interface for everyday document tasksMove existing Office files into a lightweight workspace
microsoft office alternative - wps office

Frequently Asked Questions

Why does selecting one radio button clear another selection?

Radio buttons with the same field name belong to one group, so selecting one normally clears the other. In Prepare a form, check each button's Properties and give independent groups different names.

What value should a script assign to a radio-button group?

Assign the exact export value of the desired button. Find it by opening the button's Properties in Prepare a form and selecting the Options tab.

How can I clear a radio-button group with JavaScript?

Assign the group the value 'Off', for example: this.getField('Choice1').value = 'Off'. Replace Choice1 with the exact group name.

Why should I test the form in Acrobat instead of a browser?

Browser PDF viewers may support Acrobat form JavaScript differently or not run it. Open the saved PDF in desktop Acrobat and check the JavaScript console for the complete error message.