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 |
collection punch summary |
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 |
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
Instead of using a decline-to-answer (DTA) option in a multiselect question, create a "None of the above" option with the exclusive: y
decorator.
Select all options
The selectall
tag creates an option that, when selected, automatically selects all other options.
In the example below, Q5 uses selectall: 91
to select all other options when '91' is selected. Then, Q5A uses selectall: 91,1..4
to select options 1 through 4 when '91' is selected, and similarly selectall: 92,5..8
to select options 5 through 8 with '92' is selected.
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.