If Else based of user selected fields
Hello,
Looking for some help with If Else statements in a PDF. What I would like to accomplish is changing the wording of an email subject and body based off the user choices in a drop down.
Basically if the user selects "yes" from a dropd own titled "Repair Req" when they need a repair request when submitting the form, the email subject line and body wording will change. If the user selects "no", then the subject and body are different.
var cToAddr = “user1@email.com”;
var cCCAddr = "user2@email.com;
if(this.getField("Repair Req").value!="Yes") {
var cSubLine = "FINAL w/ REPAIR REQUEST“;
var cBody = "Repair Request”;
}
else{
var cSubLine = "FINAL";
var cBody = "Final”;
}
this.mailDoc({bUI:true, cTo: cToAddr, cCc: cCCAddr, cSubject: cSubLine, cMsg: cBody});
