Enable second dropdown after first dropdown change, show a hidden table after second dropdown change

I would like to make a range calculator for a yacht. First user input would be the first dropdown (motordropdown) where the user can choose from different motors/battery. Depending on what have chosen in it, the second dropdown show filtered options. In the second dropdown (sebessegdropdown) the user can choose from different speed in km/h. After this a table should appear which shows the result. This is it:

My problem is that I can’t reach with code that the second dropdown only be enabled after the first dropdown change and the table only be shown after the second dropdown change. It is really important that the table would be hidden before the user choose something from the first and the second dropdown because without these filter the whole dataset is shown in the table and I definitely don’t want that:)
I turned off “enable on load” for the second dropdown and “hidden” for the table and this is the code what I wrote (eredmeny is the name of the table):

But it doesn’t work. Nothing happen after I choose something from the first dropdown, the second dropdown remain disabled.

Thanks for your help!

Try this one…

   $w('#motordropdown').onChange(()=> {$w('#sebessegdropdown').enable();});
   $w('#sebessegdropdown').onChange(()=> {$w('#eredmenu').show('float');});

Yeeey it’s working! Thank you so much :slight_smile: Next time I will write here immediately when I get stucked. Much more productive then try to find a good tutorial, you saved me a lot of time!

1 Like

@zsengepiac No problem.