I am using Adobe Acrobat Pro XI. I have a dropdown box that has either the value "Yes" or "No." I would like to create an If Then statement to return specific values in another text field based on the value of the dropdown box. Specifically, if the value of the "dropdown" = "No", then the value of the "textfield2" will be "N/A". If the value of the dropdown is "Yes", then the value of the "textfield2" remains empty so the applicant can enter data into "textfield2".
Hope this makes sense. Thank you in advance.
When do you want this action to occur, at the keystroke of selecting the item or when the user exits the field?
It is possible one does not even need to use an "if" statement.
Use this code as the drop-down's custom validation script:
if (event.value=="No") this.getField("textfield2").value = "N/A";
else this.getField("textfield2").value = "";
Make sure you tick the option to commit the selected value of the drop-down immediately (under Properties - Options).
Worked perfectly. Thank you!!