I have this JavaScript that works on 5 check boxes. I want to use this on Radio buttons. There are 5 checkboxes, each has a text field. If you choose button 1, all other text fields hide. Choose button 2, text field 1 comes back, and 2nd txt field hides. My issue, if using check boxes, after selecting the first checkbox, the first text field hides, if you then decide to pic 2nd checkbox, 1st chk box does not uncheck, but the field hides. Do I need an else if? if (event.target.value != "Off") { // box is checked this.getField("refusal").display = display.hidden ; this.getField("IDA unable").display = display.hidden ; this.getField("IDA ceased").display = display.hidden ; this.getField("OtherReason").display = display.hidden ; } else { // box is unchecked this.getField("refusal").display = display.visible ; this.getField("IDA unable").display = display.visible ; this.getField("IDA ceased").display = display.visible ; this.getField("OtherReason").display = display.visible ; } Or how is it done with radio buttons.
... View more