Multiple choice quiz with a limit (3 choices max)

Sep 28, 2022

I have a multiple choices quiz with 9 answers but I need to limit them to 3 choices (means when more than 3 are selected so the 4th can't be "selected" or the 3rd becomes "normal").;
I tried with many variables found here on the forum but everytime it resets the checkbox to normal and I can't select them anymore...
Would you have a tip for this kind of issue ? Would you know how to execute it with javascript ?

5 Replies
Math Notermans

Quite easy to fix. Adding 2 variables. disableChoices and maxChoices... adding a countup on the checkboxes...so disableChoices counts up from 0-9... 
varsnew

Check it here:
https://360.articulate.com/review/content/d509a2d0-45ea-4743-bfae-d797d4f8294a/review

Then added a SlideLayer with content to block the Response Checkboxes. Triggering that to show when the variable disableChoices => maxChoices... and bingo... no more clicks possible.

Kind regards,
Math

PS. you might want to change the look and feel of the blockChoices SlideLayer ;-)
And if you want more choices enabled...just change the variable maxChoices. Its now set to 3.

Math Notermans

One thing was missing from this... when selecting a choice...the user could change his response...and when clicking it again and again..as is...it will count up and up... so thats no good.

Fixed that by adding shapes to block the choices on click. On the shape itself are triggers that subtract 1, hide the shape and reset the state of the choice.

A simple Javascript to hide the elements is used too.
https://360.articulate.com/review/content/b1c27c38-022f-46fc-8ecd-0cc85bb49d66/review

Only the first three choices i added the shapes for... the others still need it.

Math Notermans

You can add in the SlideLayer that blocks all a text... 'You have only 3 choices!' 'Do you want to retry' and add a button in it that frees all selections and resets all to the start. Actually using the 'Subtract' solution you dont need to reset anything... just close the slidelayer when the user wants to change things.