PDF Editing Issues

How to Require a Checkbox Before Submitting a PDF Form

Amos GikundaAmos Gikunda Oct 28, 2026 869 views

Question details

The user wants to prevent a PDF form from being submitted unless a specific checkbox is selected by the filler.

How to Require a Checkbox Before Submitting a PDF Form
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Creating a fillable PDF form where users must agree to terms (via checkbox) before clicking the submit button.
Observed behavior
Simply marking a checkbox as 'Required' in the form settings does not stop the submit action from executing.
Before you start

Ensure you have Adobe Acrobat Pro or an advanced PDF editing tool installed, as you will need access to JavaScript capabilities to add custom form field validations.

Solution 1Recommended

Add a Custom JavaScript Validation to the Submit Button

Use a custom 'Mouse Up' script on the submit button to check if the required checkbox is ticked before executing the form submission.

By default, marking a checkbox as 'Required' does not automatically block a standard submit action. Intercepting the button click with JavaScript is the most reliable way to enforce this requirement.

1
Open Form Editing Mode

Open your document in Adobe Acrobat, navigate to the 'Tools' menu, and select 'Prepare Form'.

2
Access Button Properties

Locate your 'Submit' button, right-click on it, and select 'Properties' from the context menu.

3
Add a JavaScript Action

Go to the 'Actions' tab. Select 'Mouse Up' from the Select Trigger dropdown, choose 'Run a JavaScript' from the Select Action dropdown, and click the 'Add' button.

4
Enter the Validation Code

In the JavaScript Editor window, type the following code: if (this.getField('Checkbox1').value == 'Off') app.alert('You must first check this box!'); else this.mailDoc({cTo: 'me@server.com'});

5
Customize Script Details

Replace 'Checkbox1' with the exact field name of your checkbox, and replace 'me@server.com' with your actual destination email address. Click 'OK' and close the properties window.

Add a Custom JavaScript Validation to the Submit Button
Case Sensitivity: Make sure the field name in your script perfectly matches the checkbox name in your PDF form, as JavaScript is case-sensitive.
All-in-one PDF Editor

Create and Edit PDF Forms Easily with WPS Office

Need a simpler way to create, edit, or fill PDF forms? WPS PDF offers an intuitive interface to manage interactive PDF elements, collect data, and handle documents seamlessly.

  1. 1. Download WPS Office: Install WPS Office for free from the official WPS website and launch the application.
  2. 2. Open Your PDF: Click 'Open' and select your PDF document to load it into the WPS PDF editing tool.
  3. 3. Edit or Fill Forms: Navigate to the 'Form' tab to add interactive elements like checkboxes, text fields, or easily fill out existing forms.
  4. 4. Save and Export: Save your completed or modified PDF form and share it directly from the software with preserved formatting.
Easily create and manage interactive PDF form fieldsHighly compatible with Adobe Acrobat PDF formatsLightweight, fast, and user-friendly document interfaceComprehensive PDF toolkit for reading, editing, and signing
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't the 'Required' checkbox setting stop form submission automatically?

In many PDF viewers, setting a checkbox as 'Required' only visually highlights the field but doesn't natively halt the submit button's underlying action unless a validation script actively intercepts the click.

Can I require multiple checkboxes before submitting?

Yes, you can modify the JavaScript on the submit button to check multiple fields simultaneously using logical AND (&&) operators, ensuring all specified checkboxes are selected before the mailDoc function executes.

Will this JavaScript validation work on all PDF viewers?

Not necessarily. JavaScript execution depends heavily on the PDF reader being used. While it works reliably in standard desktop software like Adobe Acrobat, some browser-based or basic mobile PDF viewers may ignore the script.