Simple tables use a question-style syntax where the type
tag specifies both the question type (e.g., radio or checkbox) and that it will be presented as a table.
1. How often do you listen to the following types of music?
type: radio table
1. Never
2. Rarely
3. Sometimes
4. Frequently
5. Everyday
rows:
1. Hip hop/rap
2. R&B/funk/soul
3. Rock
4. Classical
5. Country
To create a simple table, you need to:
- define the question ID,
- provide the question text,
- apply the
type
tag with the desired input, - add rows or columns, and
- provide a list of answer options (for closed-ended tables only).
Details
- Simple tables use similar input types as closed-ended and open-ended questions. Begin with the question type and add 'table' to it, e.g.,
type: checkbox table
. - Simple tables also support more "interactive" input types such as stars, radio stars, sliders, and radio sliders.
- Answer options, rows, and columns can be created with inline lists (within the table's code like Q1 above) or pulled in from set lists (standalone lists), derived lists (from another question), or spreadsheets.
- When using an external list, a listcall tag such as
optsfrom
,rowsfrom
, orcolsfrom
is required to reference the list. - The
rows
,columns
,rowsfrom
, andcolsfrom
tags support heredoc formatting if desired.
Note: Simple tables work for most table designs. However, you can use the advanced table creation method for more complex table structures.
Commonly used tags
In addition to the type
tag, the following tags are frequently used in simple tables.
Tag | Description |
|
Specifies the column elements in a table.
|
dta |
Creates an opt-out ("decline to answer") option for the entire table. |
dta col and dta row |
Creates an opt-out column or opt-out row, respectively. |
(alias |
Specifies instructions to guide the respondent. |
|
Specifies the answer options in a closed-ended table. If listing options inline, the |
|
Specifies the row elements in a table where the rows are the questions. |
(alias |
Creates a running total of all answers in a given column. |
vscale: y |
Allows respondents to select options for each column instead of each row. vscale: y is only for use with radio and checkbox tables. |
Tip! For a list of table formatting and header tags, see Table formatting and Table headers.
Additional examples
Decline to answer
Decline to answer options (DTAs) allow respondents to opt-out of answering the entire table.
Decline to answer column
In text or numeric tables, DTA options can be offered per row or per column. In the example below, the respondent has the opportunity to opt-out of providing an answer for a service if it is not applicable.
See Decline to answer (DTA) for tables for more examples.
Summing column totals
SCT tables are numeric text tables that use the showcolumntotal
tag to add an additional row at the bottom of the table, displaying the sum of each column.
Notice that other tags that further define a text field, such as datatype
, prefix
, maxlength
, etc., can also be applied here.
Revealing rows
When asking an unaided brand awareness question, you can create a compact table that dynamically adds rows using the reveal rows
tag. In the example below, the table starts with one row and reveals additional rows as needed when you type.
The table is set to required: n
but also validates that the first row is not blank. This ensures the respondent enters text in at least one row.
Vertical scale table
In this vscale example, the columns are the questions and the rows are the answer options. You must select at least one option per column.
Using rows, columns, and options
This table has columns and requires two sets of answers for each row. The respondent will answer once per row for the Shapes column and again for the Colors column.
Comments
0 comments
Please sign in to leave a comment.