Hello,
On my site I'm trying to get two drop-down options to show an image.
For example, The first drop-down has two options (white bread or brown bread), you then select from the second drop-down which has three options (cheese, ham or chicken), once both drop-downs are selected you get the corresponding image for both selections appear underneath (a white ham sandwich for example).
I'm so stuck I want to scream lol. I can make the drop-downs but I have no idea how to link the two and then link the total answer to an image?
Can anyone help please?
You can save time here and put the image in the dropdown itself.
https://www.wix.com/corvid/example/dropdown-custom-element
To have a hidden image show, then just use the value from the dropdown to show depending on the users choice for that dropdown.
For example....
$w.onReady(function () { }); export function dropdownChoice1_change(event) { if ($w('#dropdownChoice1').value === 'White') { $w('#brownBread').hide(); $w('#whiteBread').show(); } else { if ($w('#dropdownChoice1').value === 'Brown') { $w('#whiteBread').hide(); $w('#brownBread').show(); } } }