Javascript in Adobe

Asked by At

First timer here and novice in coding.

I am working on a W9 and I am creating a custom calculation where it is an if/then statement

If Tax Classification is C Corporation then C If Tax Classification is S Corporation then S If Tax Classification is Partnership then P

This is the code I currently have:

var tax = this.getField("Tax").value;
if (tax = C Corporation) {
   event.value = "C";
}
else if (tax = S Corporation) {
   event.value = "S";
}
else if (tax = Partnership) {
   event.value = "P";
}

I am receiving the following: SyntaxError: missing ) after condition 2: at line 3

Where is my error in this?

0 Answers