Conditional Statements for Acrobat JavaScript
if/else statements are very useful in PDF fillable forms
Conditional JavaScript statements execute actions if those conditions are met. A simple if statement contains the word if, followed by a boolean statement inside brackets, followed by the script to be excecuted if the statement is true. A boolean statement returns either true or false. The script to be executed can be encased inside curly brackets { } but it is not necessary. I always use curly brackets because it makes it easier for me to see exactly which part of a code belongs to the condition.



