Email List based on checkbox
Hi,
I have a pdf with check boxes and when the check boxes are ticked and the form is submitted a java script runs and checks which boxes are checked. It will then get the email address from the Value of the checkbox and add it to a var, see my previous post on how I this..
However now I want to add multiple values like user1@adobe.com; user2@adobe.com
and add to a var.
The debugging console has not been helpful at all.
if(this.getField("SiPics").value == "Off"){
var ePics = ";"
} else {
var ePics = this.getField("PICS").value + ";"
}
if(this.getField("ESignoff_Lab").value == "Off"){
var eLab = ";"
} else {
var eLab = this.getField("ESignoff_Lab").value + ";"
}
if(this.getField("ESignoff_Rad").value == "Off"){
var eRad = ";"
} else {
var eRad = this.getField("ESignoff_Rad").value + ";"
}
if(this.getField("EOrder_Rad").value == "Off"){
var eORad = ";"
} else {
var eORad = this.getField("EOrder_Rad").value + ";"
}
if(this.getField("EOrder_Lab").value == "Off"){
var eOLab = ";"
} else {
var eOLab = this.getField("EOrder_Lab").value + ";"
}
if(this.getField("PH").value == "Off"){
var ePharm = ";"
} else {
var ePharm = this.getField("PH").value + ";"
}
if(this.getField("eProsafe").value == "Off"){
var ePsafe = ";"
} else {
var ePsafe = this.getField("eProsafe").value + ";"
}
if(this.getField("CW").value == "Off"){
var eWins = ";"
} else {
var eWins = this.getField("CW").value + ";"
}
if(this.getField("CK").value == "Off"){
var eMosa = ";"
} else {
var eMosa = this.getField("CK").value + ";"
}
if(this.getField("MedTech").value == "Off"){
var eMedT = ";"
} else {
var eMedT = this.getField("MedTech").value + ";"
}
if(this.getField("DH").value == "Off"){
var eIntV = ";"
} else {
var eIntV = this.getField("DH").value + ";"
}
if(this.getField("GP").value == "Off"){
var eGp = ";"
} else {
var eGp = this.getField("GP").value + ";"
}
if(this.getField("IV").value == "Off"){
var eIntra = ";"
} else {
var eIntra = this.getField("IV").value + ";"
}
var eTrain = "user1@someplace.com" + ";" + "user2@someplace.com"
var GroupCC = ePics + eLab + eRad + eORad + eOLab + ePharm + ePsafe + eWins + eMosa + eMedT + eIntV + eGp + eIntra
var eSub = "IT Access form for - " + this.getField("FirstName").value + " " + this.getField("LastName").value + " " + this.getField("Date2").value
var eMsg = "Message in bidy of email from The IT Team"
var eTo = this.getField("ManagerName").value
this.mailDoc({bUI:true, cTo:eTo, cCc:GroupCC, cBcc:eTrain, cSubject:eSub, cMsg:eMsg})Any help would be appreciated