The required
tag is used to control whether a question must be answered before the respondent can advance to the next page. This tag may be used locally on a single question or group, or it may be applied globally using set defaults
.
Note: In r8.0+, all questions are required by default. required: y
is not necessary unless you need to override a required: n
tag that has been added to a group or setdefaults
.
Syntax
The required
tag accepts three inputs: 'y', 'n', and 'w' (for 'warn').
'Warn' means that if a question is left unanswered, a message will appear asking the respondent to enter a response; however, they will be allowed to continue if they submit the page a second time without answering. This is similar to the warn: y
tag.
1. Response required
type: text
required: y
2. Response not required
type: text
required: n 3. Warning displayed if no answer on first page submission, but allowed to continue on second attempt type: text required: w
Examples
Globally required
Use the required
tag with set defaults
to enable all survey questions to require a response to continue. In the example below, the required: y
tag is used in set defaults
. This will apply the required
tag to every page in the survey, unless overwritten locally or within a group.
Global warning
To set a warning using the required
tag, you would use required: w
. The system displays a default warning message and allow the respondent to continue if desired.
Locally required
Use required: n
directly on a question to disable, or override, global requirements on that question. If there is no global requirement, use required: y
to set a single question to required while leaving all other questions not required.
Locally warn
Use required: w in the same way to warn the respondent to enter a response, if possible, then allow them to pass without entering a response.
Comments
0 comments
Please sign in to leave a comment.