PDF Editing Issues

How to Add Multiple CC Email Recipients in LiveCycle PDF Forms

Chanuka GeekiyanageChanuka Geekiyanage Nov 3, 2026 869 views

Question details

The user needs to extract two distinct email addresses from form fields in a LiveCycle PDF and combine them to populate the CC line of an outgoing email.

How to Send Two CC Email Recipients from a LiveCycle Form
Product
Adobe LiveCycle
Device & OS
not provided
Scenario
Configuring a custom email submission script in a dynamic PDF form to route copies of the form to multiple secondary recipients.
Observed behavior
Users mistakenly use the logical AND operator to separate email variables, which fails to create a valid, recognized email list for the email client.
Before you start

Ensure you know the exact SOM expressions (hierarchy paths) for the form fields that contain the target email addresses before modifying the JavaScript.

Solution 1Recommended

Concatenate Email Variables with a Comma in JavaScript

Join the extracted variable values using a comma string separator so the email client recognizes them as distinct addresses.

When writing JavaScript for Adobe LiveCycle (XFA forms), using a logical AND (&&) operator will not correctly separate strings. The email client expects a single text string containing all addresses separated by commas.

To achieve this, you must use the plus (+) operator to concatenate the extracted email variables with a comma and an optional space in between.

1
Identify field paths

Locate the exact nodes for the form fields containing the email addresses in your LiveCycle hierarchy.

2
Extract the first email

Open your script editor and assign the first email to a variable using the resolveNode method. For example: var var1 = xfa.resolveNode("form1.CourseApplicationForm.Email").rawValue;

3
Extract the second email

Assign the second email to another variable below the first one. For example: var var2 = xfa.resolveNode("form1.CourseApplicationForm.ApplicantEmail").rawValue;

4
Combine the variables

Construct the CC string by concatenating the variables with a comma and space: cCc: var1 + ", " + var2

Concatenate Email Variables with a Comma in JavaScript
Syntax Correctness: This method produces a properly formatted, comma-separated list that standard email clients can parse correctly.
WPS PDF Form Solution

Effortlessly Manage and Share PDF Forms with WPS Office

While specialized tools like Adobe LiveCycle are required for advanced XFA JavaScript coding, you can easily view, fill, and share standard PDF forms using the lightweight and versatile WPS Office PDF editor.

  1. 1. Open WPS PDF: Launch WPS Office and open your PDF form using the built-in PDF viewer.
  2. 2. Fill the form fields: Click on the designated form fields to easily type in your data or applicant information.
  3. 3. Save the document: Go to the Menu and click 'Save As' to securely preserve your filled data.
  4. 4. Share via Email: Click the 'Share' or 'Email' button on the top toolbar to automatically attach the PDF to your default email client, where you can manually add multiple CC recipients.
Easily fill and interact with standard PDF form fields without coding.High compatibility with Microsoft Office formats (Word, Excel, PowerPoint) and standard PDFs.Share filled forms directly via your default email client with just one click.Lightweight, user-friendly interface requiring no complex JavaScript knowledge.
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't the logical AND (&&) operator work for multiple emails in a CC script?

The logical AND operator evaluates statements to a boolean value (true or false) rather than combining text strings. To send an email to multiple addresses, email clients require a single continuous string where addresses are separated by commas.

Can I use semicolons instead of commas to separate email variables?

While some desktop email clients like Microsoft Outlook accept semicolons, commas are the standard RFC format for mail-to links and email string generation. Using commas ensures maximum cross-client compatibility.

How do I prevent script errors if one of the email fields is left blank?

You can add a simple JavaScript 'if' condition to check if var1 or var2 is null or empty. If a field is blank, you can skip adding the comma and the empty variable to the final 'cCc' string, preventing hanging commas.