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()
}
Great. The brackets can also be closed properly to make it reader friendly and easier to debug later.
Thanks, Solved. switch wasn't conected properly. when i connected it trough property panel, everything worked fine.
Add the closing brackets to both export functions and check if the in click event is connected properly..
I guess the brackets are not closed properly..