Checkbox questions are multiselect questions created using the type: checkbox
tag.
Tip! Multiselect questions can also be created as a listbox.
Common tags
Tag | Description |
collectionpunchsummary |
New for r9; creates a summary variable to "roll up" or summarize data selected in large lists with multiple collections (collection headers). |
columns |
Specifies the max number of columns the question's options should be arranged in. Accepts a whole number value. |
exclusive |
Specifies whether options or collections of options should never be selectable with other options. |
export unseen options as |
New for r9; renders options unseen by respondents as '"blanks" in data exports rather than '0'. The input options are '0' (default) and 'blank'. |
instruct |
Specifies instructions for respondents that are included after the question text. |
maxchecked |
Specifies the maximum number of responses that can be selected in a question or variable. |
minchecked |
Specifies the minimum number of responses that can be selected in a question or variable. |
selectall |
Specifies to automatically select all of the other checkbox response options, or a listed subset, in a question by checking the "select all" option. |
Additional examples
Setting maximum and minimum responses
The maxchecked
and minchecked
tags specify a maximum or minimum number of accepted selections, respectively, and can be used in tandem if need be.
Exclusive options
Rather than allow respondents to opt-out via a decline-to-answer (DTA) in a multiselect question, a "none of the above" (exclusive) option can be specified via the exclusive: y
decorator.
Select all options
The selectall
tag allows SPs to create an option that, when selected, will automatically select all other options.
If only the ID of the selectall option is listed, e.g., selectall: 91
, then all other options will be selected when '91' is selected. If other option IDs are listed with the selectall ID, e.g., selectall: 91,1..4
, then only the other specified options will be selected when the selectall option is clicked.
Try it!
export unseen options as
When a checkbox question is seen by a respondent, the default setting is to export all options attached to the question with a value of '0' (not selected) or '1' (selected). However, when an option is not shown to a respondent, clients may request the data be stored as a 'blank' instead of a '0', signaling that the option was not in the respondent's answer set.
In this example, we have QCOUNTRY, which is normally auto-selected for respondents when they enter the survey. If QCOUNTRY = '1', then at Q6 the respondent will only be offered options 1, 4, 5, and 99. Options 2 and 3 would never appear, however, option 2 and 3 would punch a '0' because Q6 was asked. To change this behavior, apply export unseen options as: blank
to the question.
COUNTRY. Respondent country
type: radio
1. US
2. UK
6. What sports do you like to play?
export unseen options as: blank
type: checkbox
1. Soccer {if anyChecked($QCOUNTRY,1)}
2. Cricket {if anyChecked($QCOUNTRY,2)}
3. Football {if anyChecked($QCOUNTRY,2)}
4. Tennis
5. Baseball {if anyChecked($QCOUNTRY,1)}
99. None of these {exclusive: y}
Comments
0 comments
Please sign in to leave a comment.