Fix a Missing Document Will Save JavaScript Alert in Adobe Acrobat
Question details
The user needs to determine why a PDF form's Document Will Save JavaScript alert no longer appears.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- A PDF form uses document actions and buttons to lock fields and save a flattened-style copy.
- Observed behavior
- An app.alert in the Document Will Save action no longer appears, although similar JavaScript works in the Document Will Print action.
Open the PDF directly in Adobe Acrobat rather than in a browser viewer, and note the Acrobat version under Help > About Acrobat. Check whether the alert is missing during a normal Save, the form's save button, or both.
Test the Document Will Save action in a simple PDF
Use a minimal test to determine whether the issue is specific to the original form or affects save events more broadly.
Open a simple PDF in Acrobat with access to JavaScript editing tools. If necessary, create one from a blank document.
Open Acrobat's JavaScript tools, choose Set Document Actions, and select Document Will Save. Add the test code app.alert('Will Save test'); and confirm the action.
Choose File > Save and check whether the alert appears. If the document has no unsaved changes, make a small edit before saving.
Open Set Document Actions in the original PDF and inspect its Document Will Save script for errors or conditions that might prevent the alert from running.

Check Acrobat JavaScript and security settings
Use this check if the alert also fails in a simple PDF or after an Acrobat update.
Isolate the form's save button and field-locking actions
Use this approach if a normal save works but saving through the form button does not show the alert.
Work with PDF forms and Office files in WPS Office
WPS Office is a free, lightweight alternative for everyday PDF and Office document work, with a familiar interface and support for common Microsoft Office formats to help you move existing files. It does not fix Acrobat's Document Will Save JavaScript event.

Frequently Asked Questions
Why does the print alert work but the save alert does not?
Document Will Print and Document Will Save are separate actions. Open Acrobat's Set Document Actions to compare their scripts, then test the save action in a simple PDF and check the JavaScript console for errors.
Where can I enable JavaScript in Acrobat?
Open Acrobat Preferences, select JavaScript, and check Enable Acrobat JavaScript. If the setting is managed by your organization, contact your administrator before changing it.
Does a form's save button always trigger Document Will Save?
Do not assume that every custom button follows the same path as File > Save. Compare both methods and inspect the button's Properties > Actions to see what its scripts and commands do.
Should I turn off protected mode to test the alert?
First review Preferences > Security (Enhanced), document trust settings, and your organization's policies. Avoid disabling protections without authorization; use Acrobat's console and a simple test PDF to investigate.
Can WPS Office repair the Acrobat JavaScript event?
No. The Document Will Save event is an Acrobat behavior and must be investigated in Acrobat. WPS Office can be used separately for everyday PDF and Office document work.




