Forum Discussion

JeroenVerhoeckx's avatar
JeroenVerhoeckx
Community Member
2 months ago

Is there a way to get all selected checkboxes?

Hello Articulate developers,

Does somebody know it it's possible to get all selected checkboxes and iterate over them? This would be so handy!

At the moment I show all the checkboxes on the feedback slide and hide those who aren't selected (see screenshots below). The disadvantages of this is that it takes a lot of room.


Thanks in advance!

 

 

  • If you want to display the selected items as a list, without the extra spacing, you could just set a text variable for each one to the label value if the box is checked, and empty("") if it is not. Then create a text box to display the list of variables (e.g., "%item_1%%item_2%...%item_6%". Include any separators with the label text (e.g., item_1 = "Find a Solution, "). You will have a list of only those items that were checked. 

  • That's probably on a lot of Storyline wish lists. Unfortunately, at this point, the way to concatenate and display that type of info is with JavaScript. 

    There have been posts about that JS in the past, which you might be able to find via some searching. Another option: go to the new JavaScript group and ask for help there. Or just wait until one of the JS gurus answers here.

  • SBP_Inc's avatar
    SBP_Inc
    Community Member

    I use variables and triggers that look at the value of the variable to set the state of each checkbox to Hidden if the value is true, or some number set in earlier slides.

  • JesseWu's avatar
    JesseWu
    Community Member

    I don't have the software at hand to try now. 

    I was thinking about creating true and false variables as monitors, but I wonder if it is possible to

    When user click feedbackButton, set state of checkbox 1 to hidden

    if state of checkbox 1 is not selcted;

    or

    When user click feedbackButton, set value of (new) variable customFeedback to [custom text value]

    if state of checkbox 1 is selected and/or state of checkbox 2 is selected;

  • If you want to display the selected items as a list, without the extra spacing, you could just set a text variable for each one to the label value if the box is checked, and empty("") if it is not. Then create a text box to display the list of variables (e.g., "%item_1%%item_2%...%item_6%". Include any separators with the label text (e.g., item_1 = "Find a Solution, "). You will have a list of only those items that were checked.