Hide/show text field with checkbox
Hi everyone
I am a graphic designer, Java Script is not my best friend.
I am trying to create a form where the check boxes hide / show text fields.
I have very simple code (in a Java Script document, not under the checkbox) that doesn't work ... Why ?! Please help me. Thank you in advance!
check2 is the name of the check box
text2 is the name of the text field.
---------------------------------------------
var aaa = this.getField("check2");
if (aaa.value == "Yes")
{
this.getField("text2").display = display.hidden;
}
if (aaa.value == "Off")
{
this.getField("text2").display = display.visible;
---------------------------------------------------------------
Best
Maciek
