Show/hide labels/text boxes with a checkbox
Warning I know just enough to screw things up!
Looking to hide 3 fields based on the condition (checked or unchecked) of a checkbox.
Here are the fields:
- cb_homeage (checkbox)
- tb_yearbuilt (static label)
- tb_homeyear (dynamic, inputs for the year it was built)
- tb_homeage (calculated based on today's date - tb_homeyear)
If cb_homeage is checked, the three texboxes (tb_...) would be hidden
Here is what I have that is absolutely not working.
cb_homeage/Actions/Mouse Up/run javascript
var fieldHide = event.target.isBoxChecked(0)?display.visable:display.hidden;
this.getField("tb_yearbuilt").display = fieldHide;
this.getField("tb_homeyear").display = fieldHide;
this.getField("tb_homeage").display = fieldHide;
One thing I am not sure about it the (and I'm sure I'm using the wrong terminology) checkbox identifier - so ...isBoxChecked(0) - not sure it's 0 (there are +/- 100 checkboxed and radio buttons)
