Hi, I am trying to trigger an event when a specific tag within a selectionTag is selected. When "No" is selected in selectionTags6 then it should change to next slide. It doesn seem to work. Can someone help?
let tags = $w('#selectionTags6') let selectedValues = tags.value; if (selectedValues==='No') { $w('#quizSlides').next(); }
Please note that selection tag click events are accumulated. In order to check the most recently clicked item you have to return the item at the last position of the accumulation array. See code below:
if($w('#selectionTags6').value[$w('#selectionTags6').value.length - 1] === "No"){ $w('#quizSlides').next(); }
The last item is at the total length of the array minus 1 since array indexes start at 0.
Cheers!