Count multiple select checkbox even if it gets unchecked | XM Community
Skip to main content
Question

Count multiple select checkbox even if it gets unchecked

  • July 14, 2021
  • 2 replies
  • 58 views

Forum|alt.badge.img+8

Qualtrics only counts a multiple select check box as selected if the box is selected when the page is submitted. However, I would like to be able to count how many respondents selected a multiple select check box even if they then uncheck the box before submitting the page.
Context for my request: To allow respondents to refresh their memory about a long description, I use a multiple select check box on the page with in-page display logic to display the description. Respondents can select the box to open the text description and then uncheck the box to again hide the description. My goal here is to be able to determine a count and proportion of respondents who use the reminder checkbox, counting both those who left the box checked when submitting page and those who unchecked the box after reading the text.

2 replies

grahulp5
QPN Level 3 ●●●
Forum|alt.badge.img+13
  • QPN Level 3 ●●●
  • July 14, 2021

You can add a variable and then increment it on click like below:
var incr=0
jQuery('input[type="checkbox"]').click(function() {
incr++;
})


Forum|alt.badge.img+8
  • Author
  • Level 2 ●●
  • July 14, 2021

grahulp5, thanks for the suggestion. Could you help me with the function script to set this variable to an embedded data variable?
Would it be something like...
{Qualtrics.SurveyEngine.setEmbeddedData("Q1SelectCount", incr);}