Hello,
I have an order form that gets routed around the office to different people based on a couple of conditions. All has been working well..the submit button for the form is at the bottom of the first page.
Recently I added a 2nd page to the pdf to capture referral information. I updated my script to look at a field on the 2nd page and set a CC address. For some reason though, it doesn't work. Is the coding different to select a field that is not on the active page?
The "ref" variable in the 1st section is calling the field on the 2nd page of the pdf, fyi. I've obviously got some syntax wrong because I get "missing } after property list" 34:at line 35
Please be gentle, I'm an obvious n00b:
//Get variable values
var trade = this.getField("Trade").value;
var desc = this.getField("DESCRIPTIONRow1").value;
var total = this.getField("Total").value;
var ref = this.getField("RefName").value;
//PCI sheet processing
if (total > 0.00) {
var address = "orders [at] blah [dot] com"
}
else if (desc != "") {
var address = "orders [at] blah [dot] com"
}
else if (total = "0.00") {
var address = "otheruser [at] blah [dot] com"
}
//Check if referral is blank on page two - if not set CC address
if (ref != "") {
var refcc = "otheruser [at] blah [dot] com"
}
//Populate the subject line with customer and salesperson info
var cSubline = this.getField("CustomerName").value + " order, "
+ "Custno: " + this.getField("CustNo").value + " "
+ "Salesperson: " + this.getField("Salesperson").value;
var msgBody = "Press Send to submit your order for processing!";
//Send the Order as PDF
this.mailDoc({
bUI: false,
cTo: address,
cCC: refcc
cSubject: cSubline,
cMsg: msgBody,
cSubmitAs: "PDF"
})
The rest of the script is fine.
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com