How to Display a Confirmation Message Before Signing a PDF
Question details
The user wants to prompt signers with a confirmation message (such as an agreement to terms) before they can apply a digital signature to a PDF document.

- Product
- PDF Editor
- Device & OS
- not provided
- Scenario
- Creating an interactive PDF form where users must explicitly agree to terms and conditions before the digital signature field becomes available.
- Observed behavior
- Standard PDF signature fields do not natively pause the signing process to display a confirmation prompt.
Ensure you are using a PDF editor that supports form field creation and custom JavaScript actions, as standard PDF viewers cannot implement this workaround.
Use a JavaScript Button to Reveal a Hidden Signature Field
Since PDF applications cannot pause the signing operation directly, the best workaround is to hide the signature field by default and use a custom button to prompt the user for confirmation before revealing it.
This method utilizes a basic JavaScript alert embedded in a clickable button. When the user clicks the button and agrees to the prompt, the script dynamically changes the signature field's visibility from hidden to visible.
Open your PDF in form editing mode. Right-click the digital signature field, select Properties, and change its visibility setting to 'Hidden'. Make sure to note the exact name of the field (e.g., Signature1).
Use the form tools to add a standard Button field near the location where the signature should be placed. Customize the button's label to say 'Click to Sign' or 'Agree and Sign'.
Right-click the newly created button and go to Properties. Navigate to the Actions tab, select 'Mouse Up' as the trigger, and choose 'Run a JavaScript' from the action dropdown. Click Add.
In the JavaScript editor, enter the following code: this.getField("Signature1").display = (app.alert("Do you agree to the terms?",2,2)==4) ? display.visible : display.hidden; (Replace 'Signature1' with your actual field name). Save and close the editor.
Exit form editing mode and click your new button. A prompt asking 'Do you agree to the terms?' will appear. If you click 'Yes', the signature field will be revealed for signing.

Manage, Edit, and Sign PDFs Easily with WPS Office
While setting up complex JavaScript forms may require specialized software like Adobe Acrobat, WPS Office provides a lightweight, highly compatible, and user-friendly platform for viewing, editing, and applying digital signatures to PDFs, completely free of charge.
- 1. Download the software: Visit the official WPS website and click Download WPS Office Free.
- 2. Install and launch: Run the installer and follow the on-screen instructions to set up the software.
- 3. Open and sign your PDFs: Open any PDF document in WPS Office to start utilizing its robust editing and built-in signing capabilities.

Frequently Asked Questions
Why can't I add a pop-up confirmation directly to a digital signature field?
Standard PDF specifications and digital security protocols are designed to keep the signature process secure and uninterrupted. Because of this, native form fields do not support pausing the action for custom pop-up dialogs, necessitating a JavaScript workaround.
Will this JavaScript confirmation prompt work on mobile PDF apps?
Not reliably. Many mobile PDF viewers and web browser extensions do not fully support interactive PDF forms or the execution of custom JavaScript (like app.alert). The feature is best utilized on desktop PDF software.
Can I use a checkbox instead of a button for the confirmation?
Yes. You can add a checkbox acknowledging the terms and apply a similar JavaScript action to it. When the user checks the box, the script can trigger the hidden signature field to become visible.




