Hi all, I am trying to do a questionnaire on my website but i can’t seem to show the specific questions based on what the clients answers. I tried to use either the button or the radio button onClick functions or onChange functions but both doesn’t work either.
Was wondering whether my code is wrong. I have checked the forum and used the code that is supposed to be working ( https://www.wix.com/corvid/forum/community-discussion/radio-buttons-value-to-show-and-hide-an-element-solved ) but it is not working for me. the console log is working but the boxes does not show.
the code is below:
export function buttonQ1_click(event) {
if ($w(“#radioGroupQ1”).value === “Radio button1”) {
$w(“#boxinjury”).collapse();
$w(“#box24”).expand();
}
if ($w(“#radioGroupQ1”).value === “Radio button2”) {
$w(“#boxinjury”).expand();
}
if ($w(“#radioGroupQ1”).value === “Radio button3”) {
$w(“#boxinjury”).expand();
}
if ($w(“#radioGroupQ1”).value === “Radio button4”) {
$w(“#boxinjury”).expand();
}
console.log(“box2 expanded”)
}
Thank you!!