• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Adding multiple email fields to a Javascript

Community Beginner ,
Jul 06, 2020 Jul 06, 2020

Copy link to clipboard

Copied

Hi,

 

New here and to Javascript too. I'm looking to create a 'submit' button on a form which interrogates the form for the email addresses and populates the To address with 1 email and the Cc address with 2 emails from the form. I've managed to get it working partly but am struggling to get the second cc email address to be included. Code so far below (without the third email field name which is "Line Manager's email address").

 

var cToAddr = this.getField("Staff Email 2").value;
var cCcAddr = this.getField("Area Admin email").value;
this.mailDoc({
bUI: false,
cTo: cToAddr,
cCc: cCcAddr,
cSubject: this.getField("First Name 2").valueAsString + " " + this.getField("Last Name 2").valueAsString + " " + "LDR Report" + " " + this.getField("DateField_af_date").valueAsString,
cMsg: "Please find attached your LDR Report.\n" + "Save the form for your own CPD records."
});

TOPICS
Acrobat SDK and JavaScript

Views

382

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 06, 2020 Jul 06, 2020

Use this:

 

var cCcAddr = this.getField("Area Admin email").value + ";" + this.getField("Line Manager's email address").value;

Votes

Translate

Translate
Community Expert ,
Jul 06, 2020 Jul 06, 2020

Copy link to clipboard

Copied

Use this:

 

var cCcAddr = this.getField("Area Admin email").value + ";" + this.getField("Line Manager's email address").value;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 07, 2020 Jul 07, 2020

Copy link to clipboard

Copied

LATEST

Thanks - that's perfect 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines