Show a Form Completion Warning in Acrobat Reader
Question details
The user wants a PDF form to display a completion warning, including when the viewer cannot run JavaScript.

- Product
- Adobe Acrobat Reader
- Device & OS
- not provided
- Scenario
- A form author wants to remind recipients to complete a PDF form opened in Acrobat Reader or another viewer.
- Observed behavior
- The desired warning should be visible by default and may be hidden after completion when the viewer supports the form script.
Open the PDF in an editor that can create form fields and add JavaScript actions, such as Adobe Acrobat Pro. Identify the text fields you want to check and note their exact field names.
Hide a Default Warning After Checking Form Fields
Use a visible form field for the warning and a button script to hide it after selected text fields are filled in.
The warning is visible without JavaScript. In viewers that support the button action, the script checks the named fields before hiding it; other viewers may leave the warning visible.
In Acrobat Pro, open All tools > Prepare a form. Add a text field on the first page named CompletionWarning. In its Properties, set its default value to a message such as “Please complete all required fields,” make it read-only, and leave the field visible.
In Prepare a form, add a button labeled Check completion. Open its Properties, select the Actions tab, choose Mouse Up and Run a JavaScript, and click Add.
In the JavaScript editor, enter the following script, replacing FirstName and LastName with the exact names of the text fields you want to check: var names = ["FirstName", "LastName"]; var complete = true; for (var i = 0; i < names.length; i++) { var f = this.getField(names[i]); if (!f || f.valueAsString.replace(/\s/g, "") === "") { complete = false; break; } } if (complete) { this.getField("CompletionWarning").display = display.hidden; } else { app.alert("Please complete all required fields."); }
Save the PDF and open it in Acrobat Reader. Click Check completion with the fields empty, then fill them in and click again. Also test in a viewer or configuration where JavaScript is unavailable to confirm the warning remains visible.

Keep a Permanent Warning on the First Page
Use a static message when the warning must not depend on form-field or JavaScript support.
Review PDF Forms with WPS Office
WPS Office is a free, lightweight alternative for opening and reviewing PDFs and Office documents in a familiar interface. It supports common formats for an easier move between office suites, but it does not fix Acrobat Reader JavaScript settings or guarantee that PDF form scripts will run.

Frequently Asked Questions
Why should the warning be visible by default?
A warning that is created only by JavaScript may never appear if scripts are blocked or unsupported. A visible field or static message remains available without relying on a script to show it.
Can I create the scripted warning in Acrobat Reader?
Acrobat Reader is primarily for viewing and interacting with PDFs. Use an authoring tool such as Acrobat Pro and open All tools > Prepare a form to create fields and add a button action.
Will the example script check every required field?
No. It checks only the text fields named in the script. Replace the example names with your field names and add each text field you need to check.
Why does the warning stay visible after I fill in the form?
Click the Check completion button to run the example validation. If the warning still appears, check the field names and test whether the viewer and its security settings allow PDF JavaScript.




