PDF Editing Issues

Automatically Check a PDF Checkbox When Text Is Entered in Adobe Acrobat

Elise WilliamsElise Williams Nov 19, 2026 868 views

Question details

Set up a PDF form to check a related checkbox when a user enters text or selects a radio button.

Automatically Check a PDF Checkbox When Text Is Entered in Adobe Acrobat
Product
Adobe Acrobat PDF forms
Device & OS
not provided
Scenario
A form uses a custom validation script to update a checkbox based on another field.
Observed behavior
The checkbox is not selected as expected when the related field is changed.
Before you start

Open the form in Adobe Acrobat and use Prepare a Form to identify the exact name of the checkbox field. Confirm that JavaScript is enabled and that you can edit the text field's properties.

Solution 1Recommended

Use event.value in the text field's validation script

Use this fix when entering text should check a related checkbox.

During validation, event.value contains the value being validated. Using event.target.value may not give the new value at that point.

1
Open the text field properties

In Acrobat, open the PDF and choose Prepare a Form. Double-click the text field that should trigger the checkbox.

2
Edit the validation script

Select the Validate tab, choose Run custom validation script, and click Edit.

3
Use the new field value

Enter: if (event.value != '') this.getField('Completed High School?').checkThisBox(0, true); Replace Completed High School? with the checkbox field's exact name.

4
Test the form

Close the properties, leave form editing mode, enter text in the field, and move focus to another field. Check that the related checkbox is selected.

Use event.value in the text field's validation script
Scope of the script: This example checks the first checkbox widget when the text is nonempty; it does not uncheck it when the text is cleared. A radio button trigger requires a separate action or script.
Free Microsoft Office alternative

Work with PDF forms and Office files in WPS Office

WPS Office is a free, lightweight alternative for everyday document work, with a familiar interface and support for common Office formats to make migration easier. Its PDF tools offer another way to work with forms, but they do not fix Acrobat's validation script or guarantee support for its JavaScript behavior.

Open PDF forms alongside other documentsWork with Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXUse a familiar interface for everyday document tasksStart with free tools; some PDF features may require a paid plan
QA img-9

Frequently Asked Questions

Why should I use event.value instead of event.target.value?

In the text field's Validate script, event.value holds the value being validated. Use it to test the new text before checking the related field.

Where do I find the checkbox field name?

Choose Prepare a Form in Acrobat, then inspect the checkbox in the field list or double-click it and check its properties. Use the exact field name in this.getField().

Will the checkbox be cleared if I delete the text?

No. The example only checks the box when the value is nonempty. Add separate logic to uncheck it if that is the behavior your form needs.

Does this validation script also respond to a radio button?

No. The script runs when the text field is validated. Configure a separate action or script on the radio button if its selection should update the checkbox.

Why might the checkbox not update while I am still typing?

The validation script normally runs when the field is committed, such as when you move focus to another field. Enter text and then click another field to test it.