Skip to main content
Clarkopolous
Participant
August 8, 2017
Question

Create CC address from field value

  • August 8, 2017
  • 1 reply
  • 259 views

I am creating a form which will be submitted via email. I need the form to CC an email address based on a field value.

I need it to be based on: field = employee ID then cc the email address for the particular ID

I've currently got the rest of it working. Just want to add in this CC function to streamline a process.

so far I've got:

var Subject = getField("fieldname").value;

this.mailDoc({

bUI:false,

cTo: "email address",

cSubject: "Additonal text"=Subject,

cSubmitAs: "PDF"

});

thanks

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
August 8, 2017

You should read the full documentation of the mailDoc method... There's a built-in parameter that allows you to do that, called cCc.

So your could would be:

var Subject = this.getField("fieldname").value;

var ccAddress = this.getField("employee ID").value;

this.mailDoc({

     bUI: false,

     cTo: "email address",

     cCc: ccAddress

     cSubject: "Additonal text"+Subject,

);

I also fixed some other mistakes you had in your code...