I'm a novice at using JS, but using Acrobat DC to build registration form for a small conference, which requires using the Custom Javascript calculation option. Would like to use a check box to indicate an option to use a credit card as a method of payment, which would impose a 3% "convenience fee" onto the total payment amount, yielding a new total amount owed.
In my form, the total amount owed if paying by check is named "TA1." Where I want the convenience fee amount (TA1 + 3%) is named "TA2." The checkbox is named "CheckBox6." Based on scouring the net for a solution, tried using the following javascript in calculation tab of the field "TA2.":
if (this.getField("Check Box6").value != "Off") {
// box is checked
event.value = (this.getField(“TA1”).value+(this.getField(“TA1”).value*.03) ;
} else {
// box is unchecked
event.value = 0 ;}
Don't know if the scripting is correct otherwise, but I get an error saying the "}else{" line has an illegal character. Why is there an illegal character and how can I get the correct final display?
Aucun commentaire:
Enregistrer un commentaire