Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Auibutton
destinationcategory
externalUrlhttps://www.qualtrics.com/support/survey-platform/survey-module/survey-tools/import-and-export-surveys/#PreparingAnAdvancedFormatTXTFile
fullWidthfalse
color#00A9B7
shaperounded
filterSpacefalse
externalUrliconatlaskit-ShortcutIcon
destinationexternalUrl
textColorPaletteDefault
preset
typelink
titleSource: Qualtrics AdvancedFormat TXT Documentation
textColor#F4F5F6
targettrue
selectedUrlhttps://www.qualtrics.com/support/survey-platform/survey-module/survey-tools/import-and-export-surveys/#PreparingAnAdvancedFormatTXTFile
an.spaceKeyhealthyhorns
sizemedium
iconPositionbefore
id5sbzdmeyfbs
category
alignmentleft
backgroundColorPalettecfm-organization-colors-utexas Secondary Color Palette

Overview

Advanced Format TXT files in Qualtrics are primarily used primarily for importing survey structures, such as questions, choices, and basic configurations. They These files provide an efficient way to structure and import surveys, especially for those who prefer working with raw code or need to create surveys in bulk. Whereas the format supports a wide range of question types and settings, it is However, it’s important to note that advanced logic (e.g., skip patterns or display logic) must still be added post-import in the Qualtrics platform.

...

Contents

Table of Contents
maxLevel3
minLevel1
include
outlinetrue
indent
excludeContents
stylenone
typelist
printabletrue
class

...

Overview

Purpose of Advanced TXT Format

...

  • It’s used

    Used to define the core structure of a survey, including

    question text, types, answer choices, and basic settings.While highly flexible for survey design, it doesn’t support direct inclusion of advanced

    :

    • Question text

    • Question types

    • Answer choices

    • Basic settings

  • Advanced logic like skip patterns or branching

    .
  • Implementation of Advanced Logic:

    • After importing the TXT file into Qualtrics, you can use the Survey Flow and other tools in the Qualtrics platform to add branching, randomization, and display logic.

    • Example: Adding a branch to show Question 3 only if Question 2's answer equals "Yes" must be configured post-import.

  • Syntax in Advanced TXT:

    • Each question component is explicitly defined with [[...]] tags.

    • Tags are tightly formatted (no spaces inside [[ and ]]).

    • Tags follow a hierarchical structure:

      • Question definition ([[Question:Type]])

      • Choices ([[Choices]])

      • Settings (e.g., [[Required]], [[TextValidation]])

Specifying Types Within Tags:

...

  • must be configured in the Qualtrics editor after import.

Specifying Types Within Tags

  • Tags define the type and structure of questions. Correct formatting is essential for successful imports.

  • Examples:

    • [[Question:MC]]

    indicates a multiple
    • : Multiple-choice question

    .
    • [[Question:TE]]

    indicates a text
    • : Text-entry question

    .
    • [[Question:Text]]: Descriptive text block

    • [[Question:

    Matrix
    • TE:Form]]

    specifies a matrix
    • : Form-style text entry question

    .

Tags with Multiple Types

...

...

Incorporating HTML Formatting

The Advanced TXT format allow for more flexibility and customization through the use of sub-types. By appending labels after the main tag (separated by colons), you can adjust the question’s layout, behavior, and options.

Examples of Multi-Type Tags:

[[Question:MC:MultipleAnswer]]

...

A multiple-choice question allowing multiple selections.

...

supports HTML tags for styling question text, choices, and block introductions. This allows you to improve the visual appeal and clarity of your survey by incorporating elements like bold text, italics, colors, font sizes, and more.

Common HTML Tags and Their Uses

  • Bold Text: <b>...</b>

  • Italics: <i>...</i>

  • Underline: <u>...</u>

  • Font Color: <span style="color:#HEXCOLOR;">...</span>

  • Font Size: <span style="font-size:SIZEpx;">...</span>

  • Line Breaks: <br>

Examples of HTML Formatting

  1. Styling Block Titles You can format block introductions with HTML to make them visually distinct.

Code Block
[[

...

[[Question:Matrix:Likert]]

...

A Likert-style matrix question, ideal for rating scales.

...

Block:Workshop or Training Details]]

[[Question:Text]]
[[ID:Wkshp_intro]]
<span style="color:#bf5700; font-size:32px;"><b>Workshop or Training</b></span>
  • Result: The block title will appear in bold text with an orange color and a larger font size.

  1. Adding Emphasis to Question Text You can use HTML tags to emphasize certain parts of a question.

Code Block
[[Question:

...

MC:

...

MultipleAnswer]]

...


...

[[

...

ID:Wkshp_Target]]

...

Who was 

...

the 

...

audience? 

...

<i>Select 

...

all 

...

that apply.</i>
[[

...

Choices]]
Undergraduate 

...

Students

...

Graduate 

...

Students

...

Faculty 

...

or 

...

Staff

[[Question:TE:Essay]]

...

A text-entry essay question for longer, open-ended responses.

...

  • Result: The phrase "Select all that apply" will appear in italics.

  1. Formatting Choices with HTML While it’s less common, you can use HTML in choices to provide additional emphasis or explanations.

Code Block
[[Question:

...

MC]]

...


[[

...

ID:Res_Name]]

...

Other Common Multi-Type Tags:

  • [[Question:MC:Dropdown]]: Converts a multiple-choice question into a dropdown menu.

  • [[Question:TE:Form]]: Creates a form-style question for collecting structured data (e.g., Name, Email, etc.).

  • [[Question:Matrix:Bipolar]]: Sets up a bipolar matrix for comparisons between two opposing attributes.

Combining Multi-Type Tags with Other Features

You can pair these multi-type tags with settings like [[Required]], [[RandomizeChoices]], or [[TextValidation]] for additional customization.

Example:

Code Block
languagenone
[[Question:MC:MultipleAnswer]]
Select all the colors you like:
[[Choices]]
Red
Blue
Green
Yellow
[[RandomizeChoices]]
[[Required]]

Question Type Codes

The following is a list of question types compatible with Advanced TXT formatted files. Each type is defined by specific tags, and optional sub-types can further customize the question format.

What resource(s) are you tracking this semester? <i>Select all that apply.</i>
[[Choices]]
<span style="color:green;">Narcan (i.e., naloxone)</span>
<span style="color:blue;">Safer Sex Supplies</span>
Sleep Kits
Other (please specify)
  • Result: The first two choices will appear in green and blue text, respectively.

  1. Including Line Breaks in Text Use <br> to create line breaks within question text or blocks.

Code Block
[[Question:Text]]
[[ID:Res_intro]]
<b>Resource Tracking</b><br>
This section captures details about the distribution of resources this semester.
  • Result: The block will display the title "Resource Tracking" followed by the descriptive text on a new line.

Best Practices for HTML Formatting

  1. Use HTML Sparingly: Avoid overloading your survey with too many styles, as this can make it look cluttered or distract respondents.

  2. Test Your File: Always test your HTML-formatted TXT file after importing it to ensure the styles render correctly in Qualtrics.

  3. Focus on Accessibility: Use formatting thoughtfully to maintain readability for all users, including those using assistive technologies.

...

Question Type Codes

Multiple Choice Questions

Tags: [[MC]] or [[MultipleChoiceMC:MultipleAnswer]]

...

  • Single-

...

  • Answer Questions:

...

  • Use [[SingleAnswerMC]]: A single-answer question (default).

  • Multiple-Answer Questions: Use [[MC:MultipleAnswer]]: A multiple-answer question.

  • [[Vertical]]: Displays answer choices in a vertical layout.

  • [[Horizontal]]: Displays answer choices in a horizontal layout.
  • Examples:

    Code Block
    [[
    DropDown]]: Displays answer choices in a dropdown list.
  • [[Select]]: Displays answer choices in a select box.

  • [[MultiSelect]]: Displays multiple-answer options in a select box.

Matrix Table Questions

Tags: [[Matrix]]

Sub-types:

  • [[SingleAnswer]]: Respondents can select one answer per row.

  • [[MultipleAnswer]]: Respondents can select multiple answers per row.
    Question:MC:MultipleAnswer]]
    [[ID:Entry_type]]
    What are you reporting on? <i>Select all that apply.</i>
    [[Choices]]
    Workshop or Training
    Outreach & Tabling
    Social Media
    Other

Text Entry Questions

Tags: [[TextEntryTE]] or , [[TE:SingleLine]]

Text entry questions can also be created by including 2+ consecutive underscores in the question text or by using the phrases “open text” or “open end.”

Sub-types:

  • [[SingleLine]]: Single-line text input.

  • [[Essay]]: Large text box for extended responses.

  • [[Form]]: Creates a form-style question for structured data (e.g., Name, Email).

Other Question Types

  • Constant Sum Questions: [[ConstantSum]] or [[CS]]
    Respondents distribute a constant value across multiple items.

  • Rank Order Questions: [[RankOrder]] or [[RO]]
    Respondents rank options in order of preference.

  • Text/Graphic Questions: [[Text]] or [[DB]]
    Used to display descriptive text or images without collecting responses.

Text Validation

The [[TextValidation]] tag allows you to enforce specific input criteria for text entry questions. Text validation helps to ensure that respondents input data in a specific format, reducing the likelihood of errors and ensuring data consistency. This feature is particularly useful for questions like phone numbers, email addresses, or dates. The type is defined after the tag using a colon (e.g., [[TextValidation:Numeric]]).

Common Validation Types:

  • Numeric: Ensures the response is a number (e.g., 123, 45.67).

  • Email: Validates an email address (e.g., example@domain.com).

  • Date: Ensures the response is in a date format (e.g., MM/DD/YYYY).

  • Phone: Validates phone numbers (e.g., (123) 456-7890).

  • TextLength: Restricts input to a specific character range.
    Example: [[TextValidation:TextLength:10-50]] (10 to 50 characters).

  • CustomPattern: Enforces a regex pattern for custom formats.
    Example: [[TextValidation:CustomPattern:\d{4}-\d{2}-\d{2}]] (YYYY-MM-DD).

  • URL: Ensures the response is a valid URL (e.g., https://example.com).

...

, or [[TE:Form]]

  • Single-Line Text Input: [[TE:SingleLine]] is used for single responses.

  • Form Questions: [[TE:Form]] allows multiple text-entry fields in one question.

Example: Single-Line Text Input

Code Block
[[Question:TE:SingleLine]]
[[ID:StuEmp_Qty]]
What was the total number of students working this semester?

Example: Form Question

Code Block
[[Question:TE:SingleLineForm]]
Enter your email address:
[[TextValidationID:EmailWkshp_Details]]
Workshop details:
[[RequiredChoices]]
Organization that requested
Total number of attendees

...

Other Tags

These tags are used to enhance the structure and functionality of surveys created with Advanced TXT files.

Survey-Level Tags

  • [[SimpleFormatAdvancedFormat]]: Declares a simple formatted file.[[AdvancedFormat]]: Declares an advanced formatted file.the file as an advanced format TXT file. Always required.

Question and Answer Tags

  • [[Question:{type}:{sub-type}:{sub-sub-type}]]: Defines a the question and its type (e.g., MC, TE, Matrix). Optional sub-types add further customization.

  • [[Choices]]: Lists answer choices for multiple-choice or statements for matrix questions (one per line)response options or text-entry fields.

  • [[Choice:{recode value

    [[Answers]]: Specifies answer options for matrix questions.

    [[AdvancedChoices]]: Allows advanced choice formatting (e.g., recode values).

    ID:{identifier}]]:

    Starts a choice with an optional recode value.

    [[AdvancedAnswers]]: Allows advanced answer formatting for matrix questions.Assigns a unique identifier to the question.

Block Tags

  • [[

    Answer

    Block:{

    recode value

    block name}]]: Starts

    an answer with an optional recode value.

Question Settings Tags

  • [[Required]]: Marks a question as requireda new block with a specified name.

  • [[MultipleAnswerText]]: Marks a question as allowing multiple answers.

  • [[ID:{Question ID}]]: Assigns a unique ID to the question.

Survey Flow and Page Tags

  • [[ED:{field}:{value}]]: Adds embedded data to the survey flow with an optional value.

  • [[PageBreak]]: Inserts a page break between questions.

Block Tags

  • [[Block]]: Begins a new block of questions.

  • [[Block:{block name}]]: Starts a block with a specified name

Example of a Complete Question

...

  • Displays rich-text content within a block.

Example: Block Definition

Code Block
[[Block:Workshop or Training Details]]

[[Question:Text]]
[[ID:Wkshp_intro]]
<b>Workshop or Training</b>

...

Example of an Advanced Format .txt File with 2 Complete Questions

Here’s an example of a multiple-choice question with multiple answers and a text-entry form question:

Code Block
[[AdvancedFormat]]

[[Block:DemographicsWorkshop or Training Details]]

[[Question:MC:MultipleAnswer:Vertical]]
[[ID:Wkshp_Target]]
WhatWho arewas yourthe favorite fruitsaudience? (Select<i>Select all that apply).</i>
[[Choices]]
AppleUndergraduate Students
BananaGraduate CherryStudents
Orange
[[Required]]
[[RandomizeChoices]]Faculty or Staff

[[Question:TE:SingleLineForm]]
Enter
your zip code:
[[TextValidationID:NumericWkshp_Details]]
Workshop details:
[[RequiredChoices]]
Organization that requested
Total number of attendees

...

Conclusion

The Advanced TXT format offers a powerful way to structure surveys in Qualtrics, allowing for flexibility in defining question types, layouts, and settings. While it doesn’t support advanced logic directly in the file, Qualtrics’ platform allows for easy addition of logic and flow customization after importing the survey. By mastering the use of tags and multi-type options, you can create complex and customized surveys editor provides tools for adding logic post-import. By mastering this format, you can streamline survey creation and manage large projects efficiently.

...

Special thanks to Charles GPT for helping organize and refine this article.