I have a Multiple Choice menu consisting of a few options.
I need a show() event to happen depending on which option box is ticked. In this list, if I select "Other" I need to show a textbox below the list.
Similarly, in this Multiple Choice set, depending which option is selected I would like to trigger certain events.
If this is possible, I would appreciate any help.
Thanx.
Hi @DigitalZemb Diagnostics
You can do so by making use of the onChange( ) event handler to check which fields are selected, and if "Other" is selected show a box below.
$w("#options").onChange( (event) => { const values = $w("#options").value; if (values.length > 0) { if (values.indexOf('other') === -1) { // Hide the box if (!$w('#otherBox').collapsed) { $w('#otherBox').collapse() } } else { // Show the box if ($w('#otherBox').collapsed) { $w('#otherBox').expand() } } } else { // Hide the box if (!$w('#otherBox').collapsed) { $w('#otherBox').collapse() } } })
Hope this helps~!
Ahmad
Hi Ahmad,
It works perfectly, I could kiss you! Thank you. I have been struggling with this for a few months now.
Use ----> Checkbox-Groups
Edit: Ahmad will explain you.... ๐