If/Else Javascript statements for a PDF form
I have created a form that needs an IF Else JavaScript. The form has a field that we enter either a Y (for yes) or N (for no). Another field, Field B, looks at whether there is a Y or N in FieldA and needs to either perform a calculation (product of FieldC * FieldD) if FieldA is a Y and return the result , or return a value of 0 if FieldA is an N. Did I mention I have zero JavaScript skills? So far I have this, but I keep getting "SyntaxError: missing ) in parenthetical 3: at line 4:
var nSubTotal = this.getField("PP").valueAsString;
if(nSubTotal === 'Y') {
event.value = ( OF INSTALLMENTS * Numb of Txble Parcels );
}
else if (nSubTotal === 'N') {
event.value = 0;
}
