Capturing radio button selection into a variable

Hi,

we have a slide with a lot of questions. Each question has 5 radio buttons.

The submit button checks the state of each and sets whether the question is correct or not. 

I would  also like to see what the answer selected was.  

I know I can assign a variable when they click each trigger but wondered if there was a better way? (as this would require many different triggers).

i.e. When checking the state, it also captures which was selected. Is this available anywhere?

Thank you, 

4 Replies
Walt Hamilton

You can add triggers to the submit button, but for them to function, they must appear in the list above the trigger to submit.

If they are a button set (which users have been trained to expect from radio buttons), then:

adjust variable buttonSelected to 1 on condition state of radio button 1 = selected

 adjust variable buttonSelected to 2 on condition state of radio button 2 = selected, etc. Create all 5 and at the end buttonSelected will contain the value of the selected one. They can be run at the same time as the checking for the correct answer, but have to be separate triggers  :(

(I hope you know that checking for the correct answer is built in to the submit button, and are creating your own triggers because of other design constraints.)

 

Andy Nock

OK great, so it'll either be adding triggers when user clicks each option - OR as you suggest, run multiple (the same amount) of triggers to check the state of each and add to variable when submit has been pressed.

Re checking for correct answer - yes, I am aware of this for 1 question per slide, but we'd be having multiple (5+) questions (made up of 5 x radio buttons/text boxes on each) per slide. Is this still handled on the submit button?

Thanks

peter sorenson

You know - it would make a lot more sense if there was a default variable name assigned to each radio button set AND when the learner clicked each radio button it would simply (by default once again) assign the value of that buttons LABEL to the variable.

It would cut down a a lot of redundant triggers.....