How to Send Completed PDF Forms to Multiple Selected Recipients
Question details
The user needs to configure a PDF form to automatically send completed submissions to a mix of mandatory email addresses and dynamic recipients selected by the form filler.

- Product
- PDF Forms
- Device & OS
- not provided
- Scenario
- Creating an interactive PDF form with approval routing requirements where users must select specific recipient criteria (e.g., New vs. Change).
- Observed behavior
- The goal is to programmatically read selected checkbox or dropdown values and attach the filled form to an email addressed to the combined list of required and dynamic recipients.
Ensure your PDF editor supports advanced JavaScript for document actions. Gather the list of mandatory email addresses and assign the dynamic email addresses as export values to your form's checkboxes or dropdowns.
Use Acrobat JavaScript and the mailDoc Method
Use a custom JavaScript snippet attached to a Submit button to gather email addresses from form fields and trigger the user's default email client.
By utilizing the mailDoc JavaScript method in your PDF, you can dynamically construct the recipient list based on user selections. This requires assigning email addresses to the export values of your form fields.
Open your PDF form in prepare mode and insert a new button field designated for form submission.
Right-click the button, select 'Properties', navigate to the 'Actions' tab, choose 'Run a JavaScript' from the Select Action dropdown, and click 'Add'.
Write a script to declare an empty array. Loop through your checkbox fields (e.g., EmailBox1 to EmailBox8), verify if they are checked, and push their export values into the array.
Append any mandatory, hardcoded email addresses to your array. Use the JavaScript join(';') method to combine all collected emails into a single semicolon-separated string.
Add the code `app.mailDoc({cTo: joinedEmails, cSubject: "Completed Form Submission"});` to finalize the script. Save and test the button.

Fill, Sign, and Share PDF Forms Easily with WPS Office
If writing complex JavaScript code seems daunting, WPS PDF offers a highly intuitive interface to quickly fill out interactive forms, add electronic signatures, and share completed documents directly via email with any required recipients.
- 1. Open the Form: Launch WPS Office and open your interactive PDF form document.
- 2. Fill the Fields: Click on the highlighted text fields, checkboxes, or dropdown menus to input your required data.
- 3. Sign the Document: Navigate to the 'Protect' or 'Fill & Sign' tab to quickly add a secure electronic signature if the form requires approval.
- 4. Share via Email: Click the 'Menu' button in the top left corner, select 'Share', and choose 'Email' to automatically attach the completed PDF to a new message where you can add your recipients.

Frequently Asked Questions
Why isn't the PDF Submit button working for some users?
Form submission scripts rely on JavaScript, which is not fully supported by built-in web browser PDF viewers or basic mobile apps. Users should be instructed to download and open the form in a dedicated desktop PDF reader.
Can I dynamically change the email subject line using JavaScript?
Yes, the mailDoc method allows you to set the cSubject parameter dynamically by reading the value of a specific form field, such as the submitter's name or an ID number, and concatenating it into the subject string.
Is it possible to submit form data without opening the user's email client?
Yes, but this requires setting up a web server to receive HTTP POST requests. You would use the submitForm method to send the raw form data (such as FDF, XFDF, or HTML) directly to a specified URL instead of using the mailDoc method.




