The set defaults
widget can be used to control survey settings within a specific scope and for the whole survey. To define your survey's default settings, attach any applicable tags to the set defaults
widget.
set defaults page title: Survey
autoother placeholder: Specify
autoother size: 8
autoother desc: Other
create timers: y
Typically, set defaults
is placed at the beginning of the survey source to establish basic rules for the entire survey.
Tip! Think of set defaults
as the tool for defining tags or turning components on and off within the survey. It impacts both the survey's survey programming language (SPL) and rendered content. In contrast, think about app config
as the high level survey configuration and metadata.
Details
-
Scope: The
set defaults
settings apply to all SPL and survey content that follow, unless anotherset defaults
is used, or until anend defaults
tag is met. This is called "scope." -
Inheritance: If you apply
set defaults
to a group of questions, those settings are inherited by all questions within that group, unless they are specifically overridden. This is called "inheritance."- Similarly, if you have nested groups or nested
set defaults
, the settings from the outer group orset defaults
are inherited by the inner ones, unless they are specifically overridden.
- Similarly, if you have nested groups or nested
Commonly used tags
Although many tags can be applied to set defaults
, the following tags are most frequently used.
Tag | Description |
---|---|
anchor autoother |
Specifies that autoother options in questions with either Supports 'y'/'n' inputs and defaults to 'y' in r9.0+. |
anchor exclusive |
Specifies that options identified as "exclusive" via the Supports 'y'/'n' inputs and defaults to 'y' in r9.0+. |
(alias |
Specifies whether to automatically insert a page break before every question, eliminating the need for manual page breaks. Supports 'y'/'n' inputs and defaults to 'y'. |
autosubmit |
Controls page auto-submission for single select (radio) questions in Device Diverse, Modern and Flex themes. Supports 'y'/'n' inputs and defaults to 'y'. |
(alias |
Specifies an image to use in place of the default back button image. Accepts a URL path for the custom image or a Perl expression to evaluate. |
(alias |
Controls whether or not to display the back button on survey pages. Supports 'y'/'n' inputs and defaults to 'y'. |
(alias |
Specifies an image to use in place of the default continue button image. Accepts a URL path for the custom image or a Perl expression to evaluate. |
(alias |
Controls whether or not to display the continue button on survey pages. Supports 'y'/'n' inputs and defaults to 'y'. |
(alias |
If applied to Supports 'y'/'n' inputs. |
page title |
Displays a custom text in the survey taker's browser tab. Accepts text input. |
preservecase |
Specifies that the question ID remains in the exact format as it is written in the source code. Supports 'y'/'n' inputs and defaults to 'n'. |
required |
Specifies whether questions must be answered before the page can be successfully submitted. Supports 'y'/'n' inputs and defaults to 'y'. |
showtag |
Specifies whether to show question tags (IDs) alongside the question text. Supports 'y'/'n' inputs and defaults to 'n'. |
Mode tags | Description |
question mode |
Specifies a global display setting for all questions in a survey unless a widget contains a mode tag locally to override the question mode setting. |
table mode |
Specifies a global display setting for all tables in a survey unless a widget contains a mode tag locally to override the table mode setting. |
maxdiff mode |
Specifies a global display setting for all MaxDiff exercises in a survey unless a widget contains a mode tag locally to override the maxdiff mode setting. |
Examples
'set defaults' within a 'start group'
When a respondent advances through a survey, the back button displays automatically and then fades away. To turn the back button off completely for specific questions, place the questions and the set defaults
widget with back button: n
within a group. In the example below, Q1 will never display a back button, meanwhile Q2 will display a back button for a few seconds.
start group: A_GROUP
set defaults
back button: n
1. Questions in this group inherit the set defaults values and do not have a back button.
type: text
end group: A_GROUP
2. Does NOT inherit settings from A_group.
type: text
global mode settings
If you want all the questions, tables, or MaxDiffs in your survey to use a different display mode, you can specify the mode in the set defaults
widget to apply the changes globally.
set defaults
table mode: textabove, buttons
question mode: classic
maxdiff mode: mobile
Comments
0 comments
Please sign in to leave a comment.