The create_closed
tag can be applied directly to a text question to automatically create a closed-end, hidden variable based on a list.
set list: AGE_RANGE
1. 0-17
2. 18-24
3. 25-34
4. 35-44
5. 45-54
6. 55-64
7. 65-74
8. 75+
SAGE. What is your age?
type: text
datatype: whole
create closed: QAGE {list_id: AGE_RANGE} {desc: Age ranges}
Details
- The
create_closed
tag must include an ID and a list - The list options should be formatted using these conventions:
- number, hyphen, number (e.g., 25-34), or
- hyphen, number (e.g., -18, meaning less than or equal to 18), or
- number, plus (e.g., 75+, meaning 75 or greater).
- The list cannot contain gaps or overlapping ranges
-
create_closed
may be applied multiple times on a question to create different closed-ended variations from a single open-ended variable. - A
desc
decorator can be used to provide an alternative description in the reports.
Additional examples
Applying multiple create_closed tags
set list: INCOME
1. -24,999
2. 25,000 - 49,999
3. 50,000 - 74,999
4. 75,000 - 99,999
5. 100,000 - 149,999
6. 150,000 - 199,999
7. 200,000 - 249,999
8. 250,000 - 349,999
9. 350,000+
set list: INCOMEGRP
1. -29,999
2. 30,000 - 49,999
3. 50,000 - 99,999
4. 100,000 - 349,999
5. 350,000+
INC. What is your current <b>total annual household</b> income?
type: text
datatype: whole
numberformat: 0,000
prefix: $
create closed: QINC1 {list_id: INCOME} {desc: Narrower Income Brackets}
create closed: QINC2 {list_id: INCOMEGRP} {desc: Income Brackets}
Comments
0 comments
Please sign in to leave a comment.