Hi and Happy New Year to all,
Goal is: Upon dropdown3’s menu change, check if dropdown4 is enabled ( through an irrelevant condition running somewhere else, no problem) . If this is so, wait for dropdown4’s change and once this happens do stuff).
The code below works and I’m fine but I get a yellow notice that ‘event’ is already declared. How could I do this better?
$w("#dropdown3").onChange(event => {
if ($w("#dropdown4").enabled) {
console.log("Dropdown 4 is enabled!")
$w("#dropdown4").onChange(event => {
let dropdownvalue = $w('#dropdown4').value;
console.log("Dropdown 4 value is:", dropdownvalue) ;
$w('#dataset1').setFilter(wixData.filter().eq("typeId", dropdownvalue))
.then( ( ) => {
$w("#dropdown1").disable();
$w("#dropdown2").disable();
$w("#dropdown3").disable();
$w("#dropdown4").disable();
else {} ....
Also, how can I concatenate the repetetive commands to disable each and every dropdown, one by one, in just one line?
Thanks.