How to Add Email and CC Addresses to a PDF Submit Button
Question details
The user needs to configure an interactive PDF form button that generates an email with a blank 'To' field for a customer's address while automatically including an office email address in the 'CC' field.

- Product
- PDF Editors
- Device & OS
- not provided
- Scenario
- Creating an interactive PDF form for technicians so they can easily submit completed documents to clients via email while automatically copying the home office.
- Observed behavior
- Requires a script or configuration that triggers the default email client with predefined 'CC' and 'Subject' fields, while leaving the primary recipient field open for manual entry.
Ensure you have a desktop PDF editor that supports form creation and JavaScript actions installed, and that your computer has a default email client properly configured to send outbound messages.
Use JavaScript to Configure the PDF Submit Button
Add a custom JavaScript action to your form button to trigger the email client with predefined CC, Subject, and Message fields using the mailDoc function.
Interactive PDF forms can use JavaScript to pass specific parameters to your computer's default email client. By using the mailDoc script, you can specify exactly which email fields are pre-filled when the user clicks the submit button.
In your PDF form editing mode, right-click the submit button you want to configure and select 'Properties' from the context menu.
Click on the 'Actions' tab. Under the 'Select Trigger' dropdown, choose 'Mouse Up'.
In the 'Select Action' dropdown, choose 'Run a JavaScript' and then click the 'Add' button.
In the JavaScript Editor window, enter the following script: var date = new Date(); this.mailDoc({cTo: "", cCc: "office@example.com", cSubject: "Receipt of Purchase: " + date, cMsg: ""});
Replace 'office@example.com' with your actual office CC address and customize the subject line or message as needed. Click 'OK' to save the script, then close the properties dialog.

Interact with PDF Forms using WPS Office
WPS Office includes a powerful built-in PDF editor that allows you to easily view, fill, and manage interactive PDF forms without needing heavy or expensive software.
- 1. Open your PDF in WPS Office: Launch WPS Office and open your PDF form document using the built-in WPS PDF tool.
- 2. Fill the Form Fields: Navigate through the interactive fields to input your data. WPS PDF automatically highlights fillable text boxes, checkboxes, and buttons.
- 3. Submit the Form: Click the built-in submit button on the document to trigger your default email client and send the filled PDF automatically.

Frequently Asked Questions
Why doesn't the email client open when I click the submit button?
The PDF submit button relies on your computer's default email client (such as Outlook, Thunderbird, or Apple Mail). If no default desktop email client is configured in your operating system settings, the button cannot generate the email draft.
Can I auto-populate the email body message using JavaScript?
Yes, you can add text to the 'cMsg' parameter in the mailDoc script to automatically fill the email body. For example, change it to: cMsg: "Please find the attached document for your records."
Does this PDF JavaScript work on mobile devices or web browsers?
Most mobile PDF viewers and web browsers do not fully support advanced PDF JavaScript actions like the mailDoc function. For the submit button to work reliably, users should open the form in a dedicated desktop PDF application.




