Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Grouping Checkboxes - Setting Master Checkbox

Avatar

Former Community Member
I am creating a form which contains checkboxes. Each row will have five checkboxes...two which indicate a yes response to the question and two which indicate a no response. I am trying to set the fifth checkbox to automatically check itself if both yes checkboxes are checked. Is this possible? I tried various JavaScripts on click, but they don't run correctly, the user still has to click the fifth checkbox.



Help, anyone?
1 Reply

Avatar

Former Community Member
Hi Joanne,



Here is a FormCalc script that you can add to two checkboxes to change the value of a third:



if ((form1.#subform[0].CheckBox1.rawValue == 1) and (form1.#subform[0].CheckBox2.rawValue == 1)) then

form1.#subform[0].CheckBox3.rawValue = 1;

endif



Be sure to change the names to match your form.



Mike

www.ensemble.com