PDF Editing Issues

How to Create a PDF Signature Field to Email, Save, and Reset Forms

Nimra MalikNimra Malik Nov 5, 2026 869 views

Question details

The user needs to configure a PDF signature field that, upon being signed, automatically emails the completed form, prompts the user to save a copy, and resets the original form for the next user.

How to Create a PDF Signature Field to Email, Save, and Reset Forms
Product
PDF Editor
Device & OS
not provided
Scenario
Creating a reusable PDF form for multiple customers that streamlines the submission process through automated emailing, saving, and form resetting after a digital signature is applied.
Observed behavior
The user is looking for the exact mechanism or script to apply to a signature field to automate the post-signing workflow and ensuring the blank form remains ready for the next customer.
Before you start

Ensure you are using a professional PDF editor that supports JavaScript execution and verify that a default desktop email client is configured on the machine where the form will be signed.

Solution 1Recommended

Use Custom JavaScript in the Signature Field Properties

Add a specific JavaScript code block to the 'Signed' tab of the signature field to trigger the email, save, and reset actions simultaneously.

This method requires adding an action script directly to the digital signature field's properties. By chaining a few specific JavaScript commands, the PDF will automatically open the user's default email client, clear the active form fields, and trigger a 'Save As' dialog so the document is saved as a new file rather than overwriting the blank original.

1
Access Signature Field Properties

Open your PDF form in edit mode. Double-click the digital signature field you want to modify to open the 'Signature Properties' dialog box.

2
Navigate to the Signed Tab

Click on the 'Signed' tab within the properties window. Select the option that says 'This script executes when the signature field is signed'.

3
Input the JavaScript Code

Enter the following code into the script editor: this.mailDoc({cTo: "me@server.com"}); this.resetForm(); app.execMenuItem("SaveAs");

4
Customize the Recipient Email

Replace "me@server.com" in the script with the actual email address where you want the completed PDF forms to be sent.

5
Save and Test

Close the properties window and save the PDF. Test the document by signing it to ensure it successfully launches your email client, opens the Save As dialog, and resets the form fields.

Use Custom JavaScript in the Signature Field Properties
Important Document Saving Warning: If the user does not save the file as a new document and instead overwrites the original, the reset action may clear the signed data. It is highly recommended to mark your master PDF form as 'Read-Only' in your operating system.
Professional PDF Forms Editor

Easily Create and Manage Interactive PDF Forms with WPS Office

WPS Office offers a comprehensive suite of PDF tools that simplify the process of creating fillable forms, adding digital signatures, and managing document workflows. It provides an intuitive interface for customizing form fields without the steep learning curve of other expensive PDF software.

  1. 1. Open your PDF: Launch WPS Office and open the PDF document you want to convert into an interactive form.
  2. 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to access the interactive field options.
  3. 3. Add a Signature Field: Select the 'Signature' tool and drag a box onto your document where the user needs to sign.
  4. 4. Save and Distribute: Save your newly created fillable PDF form and share it with your clients for quick and easy signing.
Quickly insert text fields, checkboxes, and signature linesSeamlessly sign PDF documents with custom electronic signaturesFully compatible with standard Adobe PDF document formatsLightweight, secure, and user-friendly PDF editing environment
microsoft office alternative - wps office

Frequently Asked Questions

Will this JavaScript work if the user views the PDF in a web browser?

Most web browsers' built-in PDF viewers (like Chrome or Edge) do not fully support advanced PDF JavaScript features like 'mailDoc' or 'SaveAs'. For the script to execute correctly, the user must open the PDF in a dedicated desktop application like Adobe Acrobat or WPS PDF.

Why didn't the email send automatically after the document was signed?

The JavaScript 'mailDoc' function relies on the default desktop email client installed on the user's computer (such as Microsoft Outlook or Apple Mail). If the user strictly relies on web-based email (like Gmail in a browser) and has no desktop client configured, the automated email action will fail.

Does a standard PDF editor license support this level of automation?

Yes, standard versions of professional PDF editors generally support adding and executing basic JavaScript commands for actions like emailing, printing, and resetting forms. However, local security settings may prompt the user to grant permission before the email is generated.