Hi,
I'm trying a really simple if/else conditional statements to show a different button by the result of the dropdown selection. I really don't know why this isn't working.
$w.onReady(function () {
$w('#destination').onChange(() => {
if ($w('#destination').value === 'outbound' && $w('#status').value === 'citizen') {
$w('#button91').show();
}
else if($w('#destination').value === 'inbound')
{
$w('#button92').show();
}
else
{
$w('#button91').disable();
$w('#button92').disable();
}
});
});
I tested it by selecting Destination to be outbound, Status as citizen but button91 doesn't show at all. I tried the second option to be displayed as well, but it did not work either (inbound).
I'm using these codes in a lightbox with a slideshow. So when user clicks a button, lightbox opens and the questions are in each slideshow. At the end of this slideshow I'd like to show the final answer(button91 or 92).
Please help :(
Hi,
All I can surmise is that you might not be comparing to the correct values.
Please post the URL of your site and I'll take a look. Only authorized Wix personnel can get access to your site in the editor.