Hey everyone,
I am new to wix code and have a few questions! I would love the support from anyone who knows how to assist me!
Here we go:
![](https://static.wixstatic.com/media/a27d24_e88736c715334d14ab1873e7f71bb991~mv2.jpg/v1/fill/w_680,h_243,al_c,q_80,enc_auto/a27d24_e88736c715334d14ab1873e7f71bb991~mv2.jpg)
I have a user input dropdown that I would like to link to the three "selection boxes".
![](https://static.wixstatic.com/media/a27d24_00a59a366f4a4141a278a59cbe0592ab~mv2.jpg/v1/fill/w_807,h_321,al_c,q_80,enc_auto/a27d24_00a59a366f4a4141a278a59cbe0592ab~mv2.jpg)
Naturally, if the user selects "1" from the dropdown, I would like the "One Selected" box to expand and the rest to collapse.
They are all currently set to collapsed on load, pending the users input.
![](https://static.wixstatic.com/media/a27d24_55af4fc4f31a4d0d9efb3b562238d3fb~mv2.jpg/v1/fill/w_867,h_385,al_c,q_80,enc_auto/a27d24_55af4fc4f31a4d0d9efb3b562238d3fb~mv2.jpg)
The "selection boxes" have an ID of the following:
The "dropdown" had an ID of the following:
Please help me figure out this code!
here is what I have that does not work, of course...
![](https://static.wixstatic.com/media/a27d24_f2d1be24b234410c902ae42099673565~mv2.jpg/v1/fill/w_459,h_241,al_c,q_80,enc_auto/a27d24_f2d1be24b234410c902ae42099673565~mv2.jpg)
After taking a look at the site you've shared I believe that you need to distinguish between the dropdown's label (1/2/3), and the dropdown's value (onecard/Twocards/Threecards).
After we've established the difference, I think your code should look something like that:
export function dropdown1_onChange(event) { if($w("#dropdown1").value === "onecard"){ $w("#ONEselected").expand() $w("#TWOselected").collapse() $w("#THREEselected").collapse() } else if($w("#dropdown1").value === "twocard"){ //and so on.. } }
Let me know if it works for you.
Doron.
@Doron Alkalay you are AWESOME!!!!!!
It works perfectly!!!
This is the 1st time I used the forum and im impressed!!! thanks so much!
im sure i will have other questions, until then, thanks so much my friend!
have a fantastic day!!
Hi Shaneice!
Please share a URL either to your site or to your editor so one of us, the Wix Code team, can inspect it and provide you with a solution.
Doron.