How to Require a Checkbox Before Submitting a PDF Form
Question details
The user wants to prevent a PDF form from being submitted unless a specific checkbox is selected by the filler.

- 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.
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.
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.
Open your document in Adobe Acrobat, navigate to the 'Tools' menu, and select 'Prepare Form'.
Locate your 'Submit' button, right-click on it, and select 'Properties' from the context menu.
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.
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'});
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.

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. Download WPS Office: Install WPS Office for free from the official WPS website and launch the application.
- 2. Open Your PDF: Click 'Open' and select your PDF document to load it into the WPS PDF editing tool.
- 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. Save and Export: Save your completed or modified PDF form and share it directly from the software with preserved formatting.

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.




