Show/hide fields based on user selection
I know some Javascript, but my first attempts to embed it in Acrobat are troublesome. I am creating a simple form where the user indicates via a checkbox how many people he or she needs to register, then the form shows that many fields to complete. I have been trying to get it to work with just one field before I add more.
In this sample I am just trying to get the second registrant field hidden if the user checks only 1 person to register. (I already know I'll have questions when it comes to needing to hide more than one field.)
if(event.target.value =="0") {
this.getField("Registrant2").display = display.hide;
}
