Trigger for radio buttons with mixed response
Dec 16, 2015
By
Sandy Mason
Here's my issue:
There are 5 questions on 1 slide with yes/no radio buttons:
- answering all with 'yes' triggers submit button to appear and moves the user to the relevant layer (no) - this works great
- answering all with 'no' triggers submit button to appear and moves the user to the relevant layer (yes) - this works great
I can't figure out what the trigger should be if 1 or more questions are answered with 'no' to move the learner to the 'no' layer (this layer directs them back to the questions so that they can reconsider their answer).
Your help is appreciated.
15 Replies
Hi Sandy
try trigger
show layer xx when user clicks submit button if radio button 1 is = No OR radio button 2 = No OR radio button 3 = No OR radio button 4 = No OR radio button 5 = No
that should work - if not, upload the slide. It will be easier for people to help if they can see your setup.
Hi Wendy
That's the formula I've used when answering all 'no' - I then have the same formula when answering 'yes'.
Attached is an image of the incomplete slide, where the all yes and all no's work. And, attached is the trigger I've used for these to work. These work fine.
I can't figure out what the trigger should be if: say if the learner selects 1 no (or more) and 4 yes's - this should move them to the no layer when submit is selected.
Hi Sandy
der of course - that won't work - sorry my bad doing too many things at once. *updated - the above post suggestion for ANd/OR was correct.
Try using a number variable when they select a No radio button add 1 to the variable - same for the yes.
Then show layer Correct when variable 'no' = 5 or variable yes = 5
Show layer xx when variable no <5
Show layer xx when variable yes <5
If you need me to do a sample file let me know
Hi Sandy,
Wendy's variable suggestion should work if you are comfortable working with variables.
Another possible approach is multiple triggers to evaluate every combination. Meaning: If No1 is selected AND Yes2 is selected AND Yes3 is selected AND Yes4 is selected. That's a lot of triggers though.
Thinking of variables, three T/F variables might work as well. One for all Yes, one for all No, and one for anything other than all Yes or all No.
Hi Wendy & Kevin
I've followed the directions for true/false variables but I'm not getting it, and I haven't worked with variables before.
Are you saying that I should select the 'no' radio button, then in the triggers select variables, add variable where name = no, type = true/false, value = true.
Then select 'yes' radio button and do the same but with variable name = yes, type = true/false, value = false.
Then do this for each radio button?
Or do I deselect the radio button/s and simply add the trigger variable where no = true/false - true and yes = true/false and no? And that I only need 2 entries in the variables? The 'use count' is showing 3 and I don't know what that means.
Getting this sorted will finish my project:)
Hi Sandy
can you upload your slide - easier to help if we can see you setup.
If I answer all radio buttons No which layer should I get
If I answer all radio buttons Yes which layer should I get
If i am understanding what you want i would do the following:
Trigger 3 would probably need to be ordered before trigger 2, to prevent someone from selecting a NO but not finishing the questionnaire and trying to submit. However i put it as 3rd here because you didnt ask for it but just in case you needed something for that scenario.
Trigger 1:
When submit is clicked,
go to layer (yes)
if Y1 AND Y2 AND Y3 AND Y4 AND Y5 is selected
Trigger 2:
When submit is clicked.
go to layer (no)
if N1 OR N2 OR N3 OR N4 OR N5 is selected
Trigger 3:
When submit is clicked
go to layer (inc) <-- This would be a layer with a box that says "please fill out"
if N1 or N2 OR N3 OR N4 OR N5 OR Y1 OR Y2 OR Y3 OR Y4 OR Y5 is not selected
Hi Sandy
see attached sample - I may have the correct/incorrect layers around the wrong way for your yes and no's but should give you the general idea.
Hi Wendy
Here you go.
Looks like a pretty simple fix. Just change your second trigger (the one for the NO layer) to OR instead of AND. and then delete the third trigger.
Here you go Sandy
I have updated your file.
Wendy, why use multiple triggers and a variable count instead of just using the built in OR statement?
Is there an advantage to this?
Thanks Wendy, that did the trick and now my project is complete... I'll just get my head around the triggers and variables you've used for the future! Wahoo!
You're right David that was my original answer, but Sandy was saying it wasn't working with the AND and OR so because I couldn't see the file setup I gave her an alternative for the count variable.
As it turns out the AND / OR does work now that I've seen her file but I went the extra step to show her the count variable as well.
Hi David,
I think the fun element (and often helpful reminder) of Storyline is there is typically more than one way to accomplish it. So it's typically about what is the easiest and makes the most sense for the individual to set up.
This discussion is closed. You can start a new discussion or contact Articulate Support.