Hello. I need to expand multiple checkbox groups when switch is turned on on same page. When there is only one group everything is working perfectly, but when i add next switch it does not work. my code looks like this:
$w.onReady( function () {
let isCollapse = $w( “#checkboxGroup1” ).collapse()
$w( “#checkboxGroup2” ).collapse();
} );
export function switch4_click(event) {
if ($w( “#switch4” ).checked) {
$w( “#checkboxGroup1” ).expand()
} else
$w( “#checkboxGroup1” ).collapse()
}
export function switch5_click(event) {
if ($w( “#switch5” ).checked) {
$w( “#checkboxGroup2” ).expand()
} else
$w( “#checkboxGroup2” ).collapse()
}