Copy link to clipboard
Copied
I have a PDF form set up that when someone opens it, the cursor is set in a specific field. My form has to be signed four times so it's passed around. I'm trying to set it up where each time a part of the form is completed and passed on to the next person, they open the form and the cursor is set up in their part. Here's what I have right now set up in Page Properties Action tab but it's not working:
if this.getField("Sig One").value = "";{
getField("Date").setFocus();
} else if (this.getField("Sig One").value != "" && this.getField("Sig Two") = "";{
getField("Sup Name").setFocus();
and so on. What am I doing wrong?
After removing the ';' it all came together nicely!!! Thanks everyone!
Copy link to clipboard
Copied
A couple of things.
First of all, you're using the wrong operator. The "=" operator assigns a value. The comparison operator is "==".
In addition, the condition after the if-statement must be placed within parentheses, which you didn't do in either one of your if-statements (lines 1 and 3).
Copy link to clipboard
Copied
ok thanks. I did the full code and it's giving me a syntax error at line 4:
if (this.getField("Sig: One").value == "");{
getField("Date (YYYYMMDD)").setFocus();
} else if (this.getField("Sig: One").value != "" && this.getField("Sig: Two").value == "");{
getField("Sig: Two").setFocus();
} else if (this.getField("Sig: One").value != "" && this.getField("Sig: Two").value != "" && this.getField("Sig: Three").value == "");{
getField("Name: 3").setFocus();
} else if (this.getField("Sig: One").value != "" && this.getField("Sig: Two").value != "" && this.getField("Name: 3").value != "");{
getField("Name: Five").setFocus();
}
Copy link to clipboard
Copied
Nevermind, I didn't see Bernd Alheit's comment before submitting.
Copy link to clipboard
Copied
After removing the ';' it all came together nicely!!! Thanks everyone!
Copy link to clipboard
Copied
and remove character ';' on line 1 and 3