PDF Editing Issues

Add a Confirmation Message Before Submitting an Acrobat PDF Form

Steven ParkerSteven Parker Nov 10, 2026 868 views

Question details

The user wants to display a confirmation message with OK and Cancel options before a PDF form is submitted and sent via email.

Add a Confirmation Message Before Submitting an Acrobat PDF Form
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Setting up a form Submit button to prevent accidental clicks by asking the user to confirm their action before executing the mailto email delivery.
Observed behavior
The current Submit button uses a direct mailto action which immediately initiates an email draft, lacking a confirmation step for the form filler.
Before you start

Ensure you have access to the PDF form in editing mode. You will need to replace any existing 'Submit a Form' or 'mailto' actions on your button with a custom JavaScript snippet.

Solution 1Recommended

Use a JavaScript Action for the Submit Button

Replace the standard mailto link with a JavaScript alert that asks for user confirmation before executing the document mailing function.

To show a popup alert with OK and Cancel buttons, you must use Adobe Acrobat's built-in JavaScript functions. By using the app.alert method alongside this.mailDoc, you can pause the submission process and wait for the user's approval.

It is critical that you remove all other actions associated with the submit button, otherwise, the default actions will fire simultaneously with your script.

1
Access Button Properties

Open your PDF form in Edit mode. Right-click the Submit button you want to modify and select 'Properties'.

2
Remove Existing Actions

Navigate to the 'Actions' tab. Look at the 'Actions' list at the bottom and delete any existing 'Submit a form', 'Open a web link', or 'mailto' actions to ensure they do not conflict with the new script.

3
Add a JavaScript Action

In the 'Select Action' dropdown menu, choose 'Run a JavaScript', and then click the 'Add' button to open the JavaScript Editor.

4
Enter the Confirmation Code

Paste the following code into the editor, customizing the email and message as needed: if (app.alert("Have you checked your form? Do you want to continue with the submission?", 2, 2) == 4) this.mailDoc({cTo: "recipient@example.com", cSubject: "Email subject", cMsg: "Email body"});

5
Save and Test

Click 'OK' to close the editor, then close the Properties window. Exit Edit mode and click the Submit button to test your new confirmation message.

Use a JavaScript Action for the Submit Button
Enforcing Required Fields: You do not need extra scripts to check for required fields. As long as specific fields are marked as 'Required' in their properties, the PDF reader will automatically refuse to send the form and display a warning if they are left empty.
Powerful PDF Editor

Create and Manage PDF Forms Seamlessly with WPS Office

If you frequently work with interactive PDF forms, WPS Office provides comprehensive PDF editing tools. You can easily fill out forms, edit PDF text, and manage your documents effortlessly without needing expensive specialized software.

  1. 1. Open your PDF: Launch WPS Office and open your PDF form document.
  2. 2. Fill or Edit the Form: Navigate to the PDF Editor or Form tab to interact with text fields, checkboxes, and buttons.
  3. 3. Save and Share: Once completed, easily save your modifications and share the filled document via email directly from the WPS interface.
Fully compatible with standard interactive PDF formsEasily fill out, sign, and manage form fieldsLightweight, fast, and secure PDF viewer and editorSeamless integration with Word, Excel, and PowerPoint file formats
microsoft office alternative - wps office

Frequently Asked Questions

Why does my PDF form send without showing the confirmation box?

You likely still have a default 'Submit a Form' or 'mailto' action attached to your button. You must remove all other actions in the button's 'Actions' properties so that only the 'Run a JavaScript' action remains.

How do I change the recipient email address in the JavaScript code?

In the provided script, locate the parameter that says cTo: "recipient@example.com". Simply replace recipient@example.com with the actual target email address where you want the form submitted.

Can I prevent the email from generating if required fields are missing?

Yes. If you mark specific text fields or checkboxes as 'Required' in their individual properties, Acrobat will automatically block the submission and prompt the user to fill them in before the JavaScript email action is executed.