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."
});
Use this:
var cCcAddr = this.getField("Area Admin email").value + ";" + this.getField("Line Manager's email address").value;
Copy link to clipboard
Copied
Use this:
var cCcAddr = this.getField("Area Admin email").value + ";" + this.getField("Line Manager's email address").value;
Copy link to clipboard
Copied
Thanks - that's perfect 🙂