Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Problem with reset

Avatar

Former Community Member

Hi Guys.

I use this wonderfully simple script I found to display a hidden table when the check box is ticked, the problem however is when you reset the form with the standard reset button, the check boxes are cleared, but the hidden tables stay visible... Can anyone offer assistance?

Many thanks

form1.Table3.Row1[1].Communication::change - (JavaScript, client)

if (Communication.rawValue == true)
{COMMTable.presence = "visible"
}
else
{COMMTable.presence = "hidden"
}

4 Replies

Avatar

Former Community Member

So you want the check boxes cleared and the table to become hidden upon reset?

Avatar

Former Community Member

Yes that's the idea, sorry I'm a real noob at this, any help would be appreciated.

Avatar

Former Community Member

No worries. The reset button has a script attached to the click event that does the reset. You can simply supplement that event with the script to hide the table. See the attached which includes..

// form1.page1.subform1.resetBtn::click - (JavaScript, client)

xfa.host.resetData();

form1.page1.subform1.table.presence = "hidden";

Steve

Avatar

Former Community Member

Brilliant, a little syntax adjustment and it worked like a charm, thank you.