Counting selected check boxes
Nov 05, 2015
I have a slide with ten check boxes. Students should select 5 of them. I have an alert layer displayed with the count if less than 5 or more than 5 are selected and submit is clicked. If 5 are selected, the submit button advances to the next slide. I use a counter variable - countcheckboxes. 2 triggers are assigned to each check box. If the state is selected, 1 is added to the counter. If a state is unselected, 1 is decremented. I set it up that way because a student might select and then unselect various check boxes before clicking submit. It seems to work fine, but if you advance past the slide and then return to it, the count gets screwed up and doesn't report the number of checked boxes accurately. I also initialize the counter to zero on the slide, so I don't know why it doesn't reset to zero when the slide is returned to. Maybe there is a better way to do this? Any help would be greatly appreciated.
4 Replies
I find it easier to do this type of counting on the submit button itself.
The simple thing is to add a trigger to reset the variable to 0 when the timeline starts
To check why it is not working add a reference to the slide and see what the value is when you come back, also check your trigger it may say add 0 instead of assign 0
Thanks, Phil - I'll take a look!
Works - thanks again!
This discussion is closed. You can start a new discussion or contact Articulate Support.