Text widgets allow you to display content on survey pages separate from the questions. They support HTML for adding images, tables, and other custom content. There are two types:
-
show text: Displays content once, where it's placed in the survey. -
set text: Creates content that can be inserted, or piped, repeatedly throughout the survey.
Single-use content with 'show text'
show text: INTRO
text: Welcome to this section of the survey.Details
- Create a
show textby providing a descriptive ID, followed by thetexttag with the content to be displayed. - The
show textwidget supports heredoc syntax. -
show textalso supports tags such asshow ifto conditionally display content based on previous answers or other survey logic. - By default,
show textinserts a new survey page, but this can be prevented withautopage: n.
Multi-use content with 'set text'
set text: PRODDESC
text: This product has these features...
1. What do you like most about this product?
preface: __PRODDESC__
type: textboxDetails
- Create a
set textby providing a descriptive ID, followed by thetexttag with the content to be displayed. - Reference the content throughout the survey using double underscores around the ID (e.g.,
__PRODDESC__). - Like
show text, theset textwidget supports heredoc syntax and additional tags such asshow if. - Unlike
show text,set textdoes not insert a page break.
show conditioned text and set conditioned text are advanced versions of show text and set text. These widgets dynamically select the content to display based on the respondent's answers or survey logic. For more information, see Conditioned text widgets.Tags
The following tags can be used with set text or show text widgets. Note that the use of the text, markdown, or html tag is required.
| Tag | Description |
autopage (alias: ap) |
Determines if a page break is inserted before the content. |
explain |
Adds a tooltip or converts it to a dialog box with dialog: y tag. |
html |
Use this tag in place of the text tag to insert HTML as-is, without a <div> container. |
markdown |
Use this tag in place of the text tag to enable Markdown syntax. |
show if / skip if
|
Conditionally hides content based on previous answers or other survey logic. |
text |
Defines lines of text. |
Additional examples
Using the 'html' tag
You can use the html tag in place of the text tag prevent content from being wrapped in <div> </div> tags. This is helpful when there are formatting issues, such as added line breaks.
For example:
| Syntax | Survey page HTML |
|
|
|
|
Using the 'markdown' tag
Markdown can be used as a simpler alternative to HTML for formatting text. To use Markdown syntax, replace the text tag with markdown. The example below also uses heredoc to accommodate the line breaks necessary for markdown.
| Syntax | Survey page |
|
Creating multiple set texts at once
The set text batch widget can be used to create multiple set text widgets at once. Then, to display any of the set text widgets created, reference it by including double underscores around the set text ID.
set text batch: COMMON_INSTRUCTIONS
SELECTALL. Select all that apply
SELECTONE. Select one
SELECTONEPERROW. Select one for each row
2. Which high-tech gadgets do you use everyday?
instructions: __SELECTALL__
type: checkbox
1. Cell phone
2. Computer
3. Video gaming unit
4. Drone
Tooltips and dialog boxes
In the example below, the 'contract' set text uses the explain tag to insert a tooltip at Q2B. Then, the 'preferred_vendor' set text adds the dialog: y tag to display a pop-up dialog box instead of a tooltip at Q2C.
Showing text conditionally with 'show if'
In the example below, the 'SWFAN' show text includes show if logic. It will only be displayed if a respondent answers option 1 at QX.
Comments
0 comments
Please sign in to leave a comment.