Collapsing form not working

Hi,

  1. I implemented the collapsing form exactly as shown in the example (https://www.wix.com/code/home/example/Collapsing-Form), but somehow it’s not working in my editor.

export function checkbox2_change(event, $w) {
if ($w(“#checkbox2”).checked)
$w(“#box5”).expand();
else
$w(“#box5”).collapse();
}

The container box is set to “collapse on load” but when I run preview, all the forms inside the container box remains the same, and just the container box disappears.

  1. I want to make expand/collapse event depend upon, the selection of dropdown box (not whether a particular input box is checked or not). In this case, the below code should work, right? It’s not working and was wondering if this collapsing form only works for checked input boxes…

export function checkboxl2_change(event, $w) {
if ($w(“#dropdown4”).value === ‘XYZ’)
$w(“#box5”).expand();
else
$w(“#box5”).collapse();
}

FYI, the input elements that I"m trying to included under container box are dropdown lists

Hi Kwanghoon,
Have you check elements drag into container box or not?

Hi,
Can you please share a link to your site so we can inspect ?
Roi