Exchange forms based on dropdown choice

I need help making this collapse() function work to swap forms in and out. I’ve tried hidden() and also doesn’t work.

I’m trying to create a registration form for an event. There are several types of registrants who will pay differing amounts. The only way I can figure out to make this work through Wix is by having a different form for each, and have the forms swap in and out depending on the user response to a dropdown “orgTypeDropdown”.

The code is pretty straightforward and I don’t understand why it is not working. In particular, it only seems to work for the #regFormLocalGov, but not for the #regFormStartup.

export function orgTypeDropdown_change(event){
$w(‘#regFormLocalGov’).collapse();
$w(‘#regFormStartup’).collapse();

if (event.target.value === 'localGov') {
	console.log('Local Gov selected');
	$w('#regFormLocalGov').expand();
} else {console.log('not localgov')}
if (event.target.value === 'startup') {
	console.log('Startup selected');
	$w('#regFormStartup').expand();
} else {console.log('not a startup')}

}

I think I may have answered my own question. It seems it was related to having the two form elements on top of each other.