Is there any way to only allow the user to select, say, 2 checkboxes in a quiz question that contains up to 5 options? I have a client that would like to prevent the user from selecting more than 2 boxes.
Personally, I would probably disable the checkboxes based off of a variable. For example, you could create a number variable with the initial value of "0", then have each selection Add +1 to the variable. When the variable changes and equals "2", you should be able to disable the checkboxes that are not currently in the "Selected" state.
Let us know if you have any trouble with this, or any questions.
Would also love to hear other suggestions on this!
Thanks. That seems to work pretty well. My only issue now is if they decide to change their mind before submitting, the checkboxes are all disabled. I can get it so the ones checked can be unchecked, but I can't seem to get the triggers/variables to allow the ones that were disabled to become enabled again.
Jason, see attached a quick example that only allows two options to be selected at any given time and still lets the user unselect an option to enable the previously disabled options gain to select a second one. It requires a bunch of triggers, but does seem to do the trick.
Hi Laura! The triggers on Michael's example should help you.
If you are still unable to get this to work for you, I would advise that you share your file so that someone in the community will be able to assist you.
This thread is a bit dated, but I'll try to help you out here.
You mention that the solution only works once. Do you need it to work on the same question or do you mean for subsequent questions in the course?
You should be able to add a trigger to re-set the variable when the user clicks it - maybe this is the submit button or maybe it's when the slide timeline starts depending on your need.
If you have a sample .story file started, I bet someone in the community will be able to better assist with your design.
11 Replies
Hi Jason,
There are probably a few options for this.
Personally, I would probably disable the checkboxes based off of a variable. For example, you could create a number variable with the initial value of "0", then have each selection Add +1 to the variable. When the variable changes and equals "2", you should be able to disable the checkboxes that are not currently in the "Selected" state.
Let us know if you have any trouble with this, or any questions.
Would also love to hear other suggestions on this!
Best of luck on the project and have a great day,
Christine
Thanks. That seems to work pretty well. My only issue now is if they decide to change their mind before submitting, the checkboxes are all disabled. I can get it so the ones checked can be unchecked, but I can't seem to get the triggers/variables to allow the ones that were disabled to become enabled again.
Hi Jason,
You could provide a "Reset" button - then, have the variable set to "0" again when that button is clicked.
Just a thought :)
Let me know if that works for you!
Jason, see attached a quick example that only allows two options to be selected at any given time and still lets the user unselect an option to enable the previously disabled options gain to select a second one. It requires a bunch of triggers, but does seem to do the trick.
Thanks! Looks like both options would work great for our client -- thanks Christine and Michael.
Glad to hear that, Jason!
Thanks Michael :D Nice job!
Hope you both have a great day,
Christine
I am also trying to limit choices to either 2 or 3 of 5 options - but I do not understand the above.
Also, I copied the tworesponsesonly_mh.story that is below, but I cannot see how it works so I can't replicate it appropriately.
I really would like some help. Thanks, Laura
Hi Laura! The triggers on Michael's example should help you.
If you are still unable to get this to work for you, I would advise that you share your file so that someone in the community will be able to assist you.
Hi everyone
Christine's solution works however it only works ounce.
does anybody know how to make this action work every time?
Hi John and welcome to E-Learning Heroes :)
This thread is a bit dated, but I'll try to help you out here.
You mention that the solution only works once. Do you need it to work on the same question or do you mean for subsequent questions in the course?
You should be able to add a trigger to re-set the variable when the user clicks it - maybe this is the submit button or maybe it's when the slide timeline starts depending on your need.
If you have a sample .story file started, I bet someone in the community will be able to better assist with your design.
Good luck with your project :)
Merci Michael,
ça fonctionne très bien!
This discussion is closed. You can start a new discussion or contact Articulate Support.