A class is a named collection of tags that can be referenced and reused across questions and variables in a survey.
setclass: std_checkbox
type: checkbox
instructions: [Please select all that apply.]
1. Which of the following have you done in the last 6 months?
class: std_checkbox
randomize: y
1. Purchased clothing
2. Gone to a movie theatre
3. Purchased office supplies
4. Purchased food from a restaurant
5. Gone to a sporting event
6. Purchased consumer electronics
7. Gone deep sea fishing
99. None of these {exclusive: y}
Details
- Two types of classes are available for your survey: system classes and survey-specific classes. The example above is survey-specific. System classes are created exclusively by IntelliSurvey administrators.
- To create a class, use the
setclass
widget followed by a unique class name. All tags listed aftersetclass
(until the next blank line) become part of the class. - To apply a class to a question or variable, use the
class
tag with the class name as the input. The widget will then inherit all tags and properties from the class. - Class properties (tags) can be overridden by reapplying the same tag locally to a question where the class is used.
System classes
IntelliSurvey offers a few system classes for common question formats. These are pre-configured at the server level and do not need to be defined locally in the survey code. These classes can also be applied using IntelliBuilder.
add_to_100_percent
The add_to_100_percent
class quickly creates an "add-to-100%" table. It ensures rows can be skipped as long as the total equals 100. Unseen and unanswered rows are automatically coded as '0' with the if not set
tag.
setclass: add_to_100_percent
type: number table
datatype: whole
if not set: 0
showcolumntotal: Total (must be 100%) {total: 100} {message: Total must be 100%.}
range: 0-100
postfix: %
required: n
nps
The nps
class creates a Net Promoter Score (NPS) rating scale with predefined headers and metrics for reporting. It uses the metric
tag to categorize respondents as "Detractors," "Neutrals," and "Promoters" and assigns scores based on their group.
setclass: nps
hscale: y
type: radio
headings: Not at all likely, Extremely likely
series: 0..10
metric: nets {args: 0,1,2,3,4,5,6} {desc: Detractors (0-6)}
metric: nets {args: 7,8} {desc: Neutrals (7,8)}
metric: nets {args: 9,10} {desc: Promoters (9,10)}
metric: transformed_average {args: 0-6== -100; 7,8==0; 9,10==100} {desc: NPS}
nps_embeddedanchors
This class is similar to nps
, but adds embedded headings, placing the heading text directly on the answer options '0' and '10'. It uses the series
tag to provide the remaining options 1 - 9.
setclass: nps_embeddedanchors
hscale: y
type: radio
0. 0 - Not at all likely
series: 1..9
10. 10 - Extremely likely
metric: nets {args: 0,1,2,3,4,5,6} {desc: Detractors (0-6)}
metric: nets {args: 7,8} {desc: Neutrals (7,8)}
metric: nets {args: 9,10} {desc: Promoters (9,10)}
metric: transformed_average {args: 0-6== -100; 7,8==0; 9,10==100} {desc: NPS}
nps_table
This class is identical to nps
, but is used for creating a radio table instead of a question.
setclass: nps
hscale: y
type: radio table
headings: Not at all likely, Extremely likely
series: 0..10
metric: nets {args: 0,1,2,3,4,5,6} {desc: Detractors (0-6)}
metric: nets {args: 7,8} {desc: Neutrals (7,8)}
metric: nets {args: 9,10} {desc: Promoters (9,10)}
metric: transformed_average {args: 0-6== -100; 7,8==0; 9,10==100} {desc: NPS}
Comments
0 comments
Please sign in to leave a comment.