


Hi,
I have 8 check boxes and would like to show a subform if any one of the check boxes is checked and hide this subform when the check box is unchecked. How can I do that?
The action builder didn't work very well.
Thanks
Sou
Views
Replies
Sign in to like this content
Total Likes
Hi,
Can we assume that all the checkboxes are in the same subform and they have the default values for on and off (that is 1 and 0).
If so try the following JavaScript in the calculate event of the subform containing the checkboxes;
var checkBoxes = this.resolveNodes('#field.[ui.oneOfChild.className=="checkButton" and $ == 1]');
Subform2.presence = (checkBoxes.length > 0) ? "visible" : "hidden";
The first line gets a list of all the child fields that are checkboxes and have a value of 1 (or on).
The next line sets the presence of the subform (which I am calling Subform2) to visible if there is one or more set to true)
Regards
Bruce
Views
Replies
Sign in to like this content
Total Likes
Hi Bruce,
Thank you, that worked great.
Regards
Sou
Views
Replies
Sign in to like this content
Total Likes