Expand my Community achievements bar.

How do i add an additional email address to my email submit button

Avatar

Level 1

I have the following script attached to a submit button:

if (form1.execValidate())

{var cToAddr = "909@gideons.org" +

var cCCAddr = RegionalDirector.rawValue

var cSubLine = xfa.resolveNode("#subform[0].#subform[7].CampName").rawValue + ", " + xfa.resolveNode("#subform[0].#subform[7].Country").rawValue + " 909 Camp Visitation Report"; var cBody = "Thank you for submitting your 909 report.\n" + "Save a copy for your records";

event.target.mailDoc({

          bUI: true,

          cTo: cToAddr,

          cCc: cCCAddr,

          cSubject: cSubLine,

          cMsg: cBody

});}

I have a field on my form that will be poplutated with a email address if another field is not empty.  If this field is popluted then the email address should be sent a copy of the email as well as the receipants above. 

I am not sure how to write the script to include this email with a if this field is not null statement.

Please help

0 Replies