choosing from a list
Hello , I have a PDF file as form and it has a list in it.
what i want is when the user choose an item from the list, shows some text field and hide another.
and i wrote this code but what it does escap all the IF statment and executes the ELSE statment only whatever the user chooses from the list.
if (event.value == "Option1" {
this.getField("Show_1").display = display.visible;
this.getField("Show_2").display = display.hidden;
}
else if (event.value == "Option3") {
this.getField("Show_1").display = display.hidden;
this.getField("Show_2").display = display.visible;
}
else {
this.getField("Show_1").display = display.hidden;
this.getField("Show_2").display = display.hidden;
}
so what is wrong with my code.
NOTE: Inside the parentheses is Arabic text which is the list items (option1) and the names of the fields (show_1) that I want to hide or show.