PDF Editing Issues

How to Create an Email CC List from Acrobat Form Checkboxes

Camila MilosovichCamila Milosovich Nov 3, 2026 869 views

Question details

The user needs to collect email addresses from selected PDF checkboxes to dynamically generate an email CC list and send the form using JavaScript.

How to Create an Email CC List from Acrobat Form Checkboxes
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Setting up a PDF form to automate an email submission process where specific recipients are copied based on which checkboxes the user selects.
Observed behavior
A JavaScript snippet is required to extract the export values of checked boxes, ignore unchecked 'Off' states, construct an email subject, and execute the this.mailDoc function.
Before you start

Ensure that the 'Export Value' of each checkbox in your PDF form properties is explicitly set to the corresponding recipient's email address, rather than the default 'Yes'.

Solution 1Recommended

Use an Array Push Method for the CC List

This method stores valid checked values in an array and joins them with semicolons, creating a clean, error-free CC string for the mailDoc function.

By utilizing an array, the script avoids trailing semicolons in the email address string, which can cause submission errors in some email clients.

1
Access Button Properties

Right-click the Submit button on your PDF form, select 'Properties', and navigate to the 'Actions' tab.

2
Add JavaScript Action

Set 'Select Action' to 'Run a JavaScript' and click the 'Add' button to open the JavaScript editor.

3
Input the Array Script

Declare an array of your field names (e.g., var fields = ['MD', 'HR'];). Create a 'for' loop to iterate through the fields, using this.getField(fields[i]).value to extract the selection.

4
Filter Unchecked Boxes

Add an 'if' statement checking that the value is not 'Off' (if (value !== 'Off' && value !== '')). If true, push the value into a new array called 'cc'.

5
Execute mailDoc

Use this.mailDoc({bUI:true, cCc:cc.join(';'), cSubject:'Completed Form', cMsg:'Please review.'}) to open the email client with the joined array values.

Use an Array Push Method for the CC List
App Response Prompt: You can use app.response() within the cTo parameter to prompt the user to manually enter the primary recipient's address before the email opens.
Advanced PDF Form Management

Create and Edit Interactive PDF Forms with WPS Office

WPS Office provides powerful PDF editing capabilities, allowing you to easily create fillable forms, configure checkbox export values, and assign custom JavaScript actions to buttons.

  1. 1. Open PDF in WPS: Launch WPS Office and open your PDF document using the built-in WPS PDF editor.
  2. 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to view all interactive form controls.
  3. 3. Configure Checkboxes: Double-click a checkbox to open its Properties. Go to the 'Options' tab and set the 'Export Value' to the target email address.
  4. 4. Add JavaScript Action: Double-click your Submit button, go to Properties > Actions, choose 'Run a JavaScript', and paste your email routing script.
Easily insert interactive form controls like buttons and checkboxesAssign and manage custom JavaScript actions for automated workflowsFully compatible with standard PDF formats and Adobe Acrobat form elementsLightweight, fast, and user-friendly interface
QA img-9

Frequently Asked Questions

Why does my script return 'Off' instead of an email address?

In standard PDF forms, 'Off' is the default system value for an unchecked checkbox. Your JavaScript must explicitly check if the field value is not equal to 'Off' before appending it to your email list.

How do I change the export value of a PDF checkbox?

Right-click the checkbox and select Properties. Navigate to the Options tab, locate the 'Export Value' field, and replace the default 'Yes' with the specific email address you want to trigger when checked.

Why is the mailDoc function not opening my email client?

The mailDoc function relies on the operating system's default desktop email client (such as Outlook or Apple Mail). If you rely entirely on webmail or if your PDF reader's security settings restrict email integration, the script may fail to execute.

Can I bypass the email confirmation prompt when submitting?

Setting the bUI parameter to false in the this.mailDoc() method attempts to suppress the user interface prompt. However, modern PDF security settings will often still trigger a secondary security warning to prevent malicious silent emails.