How to List Missing Required Fields Before Acrobat PDF Form Submission
Question details
The user wants to display a specific list of missing required fields using a custom script, but needs to suppress Acrobat's default generic warning message that appears beforehand.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Submitting a PDF form with required fields using a custom JavaScript validation script.
- Observed behavior
- Acrobat displays its built-in generic required-field warning before executing the custom script's alert that lists the specific missing fields.
Ensure you have editing permissions for the PDF form and access to Adobe Acrobat's Prepare Form tools to modify the JavaScript actions on your Submit button.
Execute Validation Script Before Native Submit Action
Remove the built-in 'Submit a form' action from the button and handle the actual submission via JavaScript only after your custom validation passes.
Acrobat's default warning triggers because the native 'Submit a form' action automatically checks for any fields marked as 'Required' in their properties. If you use a custom JavaScript for validation but leave the native Submit action in place, Acrobat's check runs first.
By removing the native Submit action and appending a submission command to the end of your custom script, you bypass the default warning completely.
Enter 'Prepare Form' mode in Acrobat. Right-click your Submit button and select 'Properties'.
Navigate to the 'Actions' tab. In the Actions box, select the 'Submit a form' action and click the 'Delete' button.
Under 'Select Action', choose 'Run a JavaScript' and click 'Add'. Paste your existing validation script into the editor.
At the very end of your script, add an 'else' condition to submit the form if no fields are empty. For example: `else { this.submitForm({cURL: "mailto:your@email.com"}); }`. Click OK to save.

Remove Native Required Flags and Validate Purely via Script
Uncheck the 'Required' property on all form fields and maintain an array of required field names directly within your JavaScript.
Edit and Fill PDF Forms Easily with WPS Office
While advanced JavaScript form validation is highly specific to Adobe Acrobat, WPS Office provides a lightweight, free, and highly compatible suite for viewing, editing, and filling standard PDF forms alongside Word, Excel, and PowerPoint files.

Frequently Asked Questions
Why does Adobe Acrobat show a generic required field warning?
By default, if any form field has the 'Required' property checked in its settings, Acrobat's built-in validation checks these fields during a native 'Submit a form' action. It triggers a standard warning before running most custom scripts.
Can I disable Acrobat's default validation without removing the required checkboxes?
Yes, you can remove the native 'Submit a form' action from your button's Actions tab and use a 'Run a JavaScript' action instead. This allows your script to handle the validation first and only trigger the submission programmatically if the conditions are met.
How do I alert the user of missing fields in a PDF form?
You can use the `app.alert()` JavaScript method. By collecting the names of empty required fields into an array, you can use `.join("\n")` to list them neatly in a single alert popup.




