Expand my Community achievements bar.

check boxes in hidden subforms

Avatar

Former Community Member

Hello,

I have hidden forms which contain check boxes, when the boxes are checked, other hidden forms appear. but if the original subform gets re-hidden, the x on the checkbox stays. Is there a way to clear this so that if the hidden form re-opens, the x's are gone?

1 Reply

Avatar

Level 10

Hi,

In the script that hides the subform, you would need an additional line to set the checkbox's rawValue to "0".

for example:

subform1.presence = "hidden"; // hide the subform

subform1.checkbox1.rawValue = "0"; // untick the checkbox

If ticking the checkbox shows another subform, you may want to include another line to hide that subform as well. With the lines above, it would look like this:

subform1.presence = "hidden"; // hide the subform

subform1.checkbox1.rawValue = "0"; // untick the checkbox

subform1.checkbox1.execEvent("click"); // fires the click event now that the checkbox is unticked

Hope that helps,

Niall