"Decline to answer" options (a.k.a., DTAs) can be used with any kind of question or table to add a single checkbox above or below the variable in order to disable the question inputs. This is useful for allowing an opt-out option for a question, or an entire table as a whole. To define a DTA option, use the dta
tag and include an option number, followed by a period and the option text.
Other tags may be combined with dta
to alter the functionality and appearance of the DTA script, and variables can even include multiple DTA options.
Try it!
Syntax
# short (equivalent to 'dta: 99. Decline to answer') 1. This is a question. type: text dta: y # basic DTA 1. This is a question. type: radio 1. Opt 1 2. Opt 2 dta: 99. DTA option text # multiple DTAs 1. This is a question. type: radio 1. Opt 1 2. Opt 2 dta: 98. Decline to answer dta: 99. Don't know
Tip! If multiple DTA options are included on a variable, data-wise they will not be exclusive of each other. Technically, all DTA options could be selected for a question as well. In Modern-based themes (e.g., Device Diverse, Flex), this can be achieved by selecting a DTA option, then clicking the back button after the response is auto-submitted, selecting the other(s) DTA option(s), and resubmitting the responses.
Tags
The following tags may be used along with the dta
tag. Apply the tags after the DTA option as decorators.
Tag | Description |
---|---|
before |
Accepts 'y' (yes) and 'n' (no) inputs; setting to 'y' causes the DTA option(s) to be displayed before the question/table to which it is attached. Defaults to 'n' (displaying after the question/table). |
qid |
Allows the user to rename the DTA option for reporting instead of using the default, QID_DTA. |
message |
Accepts 'y' (yes) and 'n' (no) inputs or string; setting to 'y' applies the "required" message - "Required fields are missing. Please make sure that you have completed all fields that are marked with a {[icon]}." The |
|
Accepts 'y' (yes) and 'n' (no) inputs; setting to 'y' causes the DTA option(s) to be displayed alongside the question's options, rather than separate from them. |
Note: When referencing a table's DTA, be sure to use a 'T', e.g., '$T3_DTA'. '$Q3_DTA' should only be used if referring to a question's DTA.
Note: If a variable includes multiple DTA options and the before
, qid,
or message
tags are required, apply them to the first DTA option's definition. DTA messages that are applied to multiple DTA options should be worded in such a way that they will fit all options. For example:
dta: 98. Decline to answer {message: Please enter a response or select either 'decline to answer' or 'not sure'.} dta: 99. Not sure
Examples
Basic
By default, DTA options are displayed separately of other question options. To instead display the DTA option(s) alongside the other question options, add the decorator {inline: y}
, after the DTA option text as shown in Q1A.
Using multiple DTAs
Questions allow usage of multiple DTA options, each defined with its own dta
tag.
With decorators
DTA options may use decorators to modify their reporting IDs, the DTA message displayed, or the display location of the option (before or after the variable). To modify a DTA option, use the decorators inline after the DTA text. If multiple DTA options are utilized for a variable, include the decorator(s) with the first of the DTA options.
DTA options in rating scales
The hscale
tag is often used for scalar, single-select (radio) questions to convert them into a horizontal format which accepts headings. When hscale
is set to 'y', the headings
tag can then be applied to specify headings. The inline
decorator is used to display the DTA option alongside the scale, with a heading of "N/A" added as well after the single "pipe" ( |
) so that the other headings only apply to the scale.
SPs can also include table mode: vertical
with the question so that the headings for each end of the scale are included in the options for the bottom and top of the scale as shown in QX1.
Conditioned opt-outs
DTA options can also include condition decorators to specify when (or whether or not) to display the option. If multiple DTA options are included on a question, each can be conditioned as needed.
Basic table
When DTA options are added to a table, they act as an opt-out for the entire table as shown below. If the goal is to instead allow for opt-outs per row, SPs can create an "exclusive" option and include the option ID with the
exclusive
tag (e.g., exclusive: 99
) for checkbox questions. For radio questions that require an opt-out per row, an additional option can be added without the exclusive
or dta
tags - e.g., '99. I didn't do any of these.'
Tip! To create a set of DTA options for a row or column in a text or numeric input table, use the dta row
and dta col
tags.
With validation
Typically when referring to a response or variable "answer," we must append '$Q' to the front of it (e.g., '$Q3'), but in the case of using condition logic with tables, a '$T' must be used instead. In the below example, the validation checks that the respondent has either selected the DTA option for T5, or has at least filled in the first row of the text table. If the respondent attempts to press the continue button without doing either of these, a warning message will prompt them to provide an answer or select "I don't know any."
Notice that in this scenario, the message
decorator must be applied to the
validation
tag instead of the DTA option.
Reporting
When a dta
tag is added to a question, a separate field/column is added to the data set. The new field is labeled with the ID of the question widget, plus an appended '_DTA' (e.g. T5_DTA). This default behavior can be modified by using the qid
tag noted above.
Additionally, in the Topline report, the parent tile will reflect a separate N counting the number of responses in which it was checked.
Comments
0 comments
Please sign in to leave a comment.