PDF Editing Issues

How to Create a PDF Submit Button That Emails the Form

Amos GikundaAmos Gikunda Nov 3, 2026 869 views

Question details

The user wants to configure an interactive PDF form with a submit button that automatically emails the completed form to an email address dynamically entered by the user within the document.

How to Create a PDF Submit Button to Email the Form
Product
PDF
Device & OS
not provided
Scenario
Creating a self-service interactive PDF form where users fill out their details and use a built-in button to send the finalized copy to themselves.
Observed behavior
The goal state is that clicking the submit button retrieves the email address typed into a specific form field and launches the default email client with the filled PDF attached and the 'To' field populated.
Before you start

Ensure your PDF form already contains a designated text field where the user will enter their email address before you attempt to configure the submit button.

Solution 1Recommended

Configure a Dynamic Email Submit Button via Prepare Form

Use the interactive form editing tools to add a button and assign a custom JavaScript action that pulls the email from the user's input and triggers an email submission.

To make the submit button dynamic, standard "mailto:" links are insufficient because they require a hardcoded email address. Instead, you need to use a short JavaScript action to read the value from the user's email field and apply it to the outgoing message.

1
Open Prepare Form Mode

Open your PDF document in your advanced PDF editor (such as Adobe Acrobat) and select the 'Prepare Form' tool from the right-hand pane or Tools menu.

2
Create the Email Text Field

Add a new Text Field to the document where users will type their email address. Right-click the field, choose 'Properties', and name it exactly 'EmailAddress' (without quotes).

3
Add the Submit Button

Select the 'Button' tool from the toolbar and place it on your form. Double-click the button to open the Button Properties dialog, and under the 'General' tab, name it 'Submit'.

4
Assign the JavaScript Action

Go to the 'Actions' tab in the Button Properties. Under 'Select Trigger', choose 'Mouse Up'. Under 'Select Action', choose 'Run a JavaScript', then click 'Add'.

5
Enter the Email Script

In the JavaScript Editor, enter the code to pull the email address and attach the document. For example: var email = this.getField('EmailAddress').value; if(email) { this.mailDoc({cTo: email}); } Click OK to save the script.

Configure a Dynamic Email Submit Button via Prepare Form
Testing Your Form: Always test the submit button in a standard PDF viewer (like Acrobat Reader) rather than a web browser. Ensure you have a default local email client (like Outlook or Apple Mail) configured on your computer to process the outgoing message.

Easily Edit and Share Interactive PDF Forms with WPS Office

WPS Office provides a comprehensive, easy-to-use PDF editor that lets you view, fill, and manage interactive PDF forms effortlessly. If you need a lightweight application to handle complex documents, WPS Office has you covered.

  1. 1. Open the PDF File: Launch WPS Office and open your interactive PDF form.
  2. 2. Fill the Form: Click directly into the interactive text fields to enter your information, including your email address.
  3. 3. Save the Document: Click the Save icon or press Ctrl+S to save the filled data into the PDF file.
  4. 4. Share via Email: Click the 'Menu' or 'Share' button in the top right corner and select 'Email' to instantly attach the completed document to a new message using your default email client.
Seamlessly open, view, and fill interactive PDF forms without compatibility issues.Highly compatible with standard Adobe Acrobat PDF formats and interactive elements.Built-in sharing features to quickly email your completed forms in one click.Lightweight software with a familiar, user-friendly interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why isn't the PDF submit button opening my email app?

This typically happens if there is no default desktop email client (such as Microsoft Outlook, Apple Mail, or Thunderbird) configured on your computer. Webmail users (like Gmail in a browser) may need to save the filled PDF manually and attach it to a new email.

Can I use a standard "mailto:" link without JavaScript?

Yes, you can set a button's action to 'Submit a form' and enter 'mailto:your-email@domain.com' in the URL field. However, this method only sends the form to a fixed, pre-defined email address rather than one dynamically entered by the user.

Will this dynamic submit button work on mobile devices?

PDF submit buttons and custom JavaScript rely heavily on desktop email clients and advanced PDF software. On mobile devices, functionality is limited; many mobile PDF reader apps do not support form submission actions or JavaScript.

How do I ensure the entire completed PDF is attached, not just the form data?

If you are using the 'Submit a form' action instead of JavaScript, ensure you select 'The complete document' (PDF) as the export format in the Submit Form Selections dialog. This ensures the entire filled form is sent rather than just raw FDF or HTML data.