Version Notice: This article covers features in our r9/IS Pro platform. If you're looking for information on this topic related to r8, see Create questions tutorial.
Overview
Some of the more basic structures in a survey questionnaire consist of single or multiple choice (close-ended) and text or numeric entry (open-ended) questions.
Closed-ended questions can constitute the bulk a survey. Unlike open-ended questions that allow typed responses, these questions have a limited set of answer choices to choose from. Closed-ended questions can have localized options included with the programmed question known as inline options, or use options that are separately defined in a list, in a sheet, or from another question. Various tags can be used to split an option list into columns, display it horizontally, or present only the options chosen in previous questions.
While open-ended questions do not include a list of predefined options, you can specify input requirements and apply formatting tags to handle various types of data collection, like postal codes, phone numbers, emails, and more.
IntelliSurvey uses a range of question types and conventions covered in the Questions and variables section.
Related reading and resources
The following articles can be used for reference with this training module. Note that "Question types overview" provides descriptions and examples of the various question types shown in this tutorial, plus links to their primary articles.
- Question types overview
- Creating standalone lists (setlists)
- datatype
- Randomizing and controlling option order
- declinetoanswer (dta)
- exclusive
- instructions
Options List Setup Discussion | Survey Source Code - Coded SPL |
Many of the closed-ended examples in this section use this COLORS list as response options. Like many programmed questions, options are defined by a number (creating the option ID), followed by a period, a space (recommended, but optional), and then the option text. Lists of options can be defined independently as standalone widgets, or within other widgets (i.e., questions and tables). Various types of option decorators will be introduced throughout these tutorials, which add functionality to an option or group of options. Note: Add this COLORS list to your survey, via a Tip! Answer options will appear in the order they're programmed. Sequencing can also be manipulated by using
|
setlist: COLORS 1. Black 2. Blue 3. Green 4. Orange 5. Purple 6. Red 7. Violet 8. Yellow |
Question Tags video
The following training video provides an introduction to common question types and tags that are frequently used to create questions. We recommend that you watch this before continuing with this training module.
Single-choice questions
Radio and pulldown question types only allow one response to be selected from a list of options, creating single-choice, closed-ended questions. The questions in this section use tags associated with a radio question widget.
Questionnaire Content | Discussion Details | Coded SPL |
A1. Do you like colors? |
A1 and A1A are standard radio button questions. By default one and only one answer must be selected.
Note: A
required: n tag may be used to allow unanswered questions. |
Add this code to your survey and run it to see the result. A1. Do you like colors? type: radio 1. Yes 2. No |
A1A. What color is a ripe tangerine? |
A Since this uses the colors from our COLORS list, we can "pull in" our list's elements with the |
A1A. What color is a ripe tangerine? |
A1B. What color is a ripe banana? |
A pulldown response box displays a menu of options that emerges when clicked. The |
A1B. What color is a ripe banana? |
A1C. What color is a ripe strawberry? |
A standard question using the The Tip! You can add the See here for an example. |
A1C. What color is a ripe strawberry? |
Training Tutorial Routine |
Continue to work in your FLast_r9_intro survey (visit Training Tutorials for setup steps) by integrating the new content from each practice session.
Once you finish reviewing each survey question, add the widgets to your survey area via the SPL editor. Any time the survey code compiles without any errors, you will be taken to the next screen called the survey compilation page. You can launch Testmode by clicking the Test 2 button from this screen, or you can open the Test Survey applet from the left navigation menu. Review your survey and test your new questions. After testing your survey, be sure to make any necessary corrections. Make this your routine following each section. Read Test levels and 'testmode' for more information. Tip! You can keep a test survey open in a separate browser window. Each time you upload, you can go back to your survey, refresh the browser, and continue testing. If you need to pause testing, take note of your test ID. Later, you can modify your test URL to use the previous test ID, and pick up right where you left off. |
Adding test data
Before reviewing data from the new questions you programmed, the survey must contain responses. This can be done by running through the survey multiple times. However, there is a more convenient method for compiling test data called dummy data. To create dummy data, expand the Build navigation group and select Dummy Data. When the Dummy Data tool is opened, the Count field defaults to '10'. Simply press Go, and generate 10 test records for your survey.
Note: Dummy Data runs while your browser tab is in focus. If you minimize the browser or click in another tab, the Dummy Data process will pause.
Now that the survey contains data, read Getting started with reports to learn about the various ways you can take a look at the data. We'll review how data is stored in the next section.
Data storage for single-choice questions
Discussion Details |
Question variables in the dataset are prepended with a 'Q' by default. However, this prefix can be modified using the |
The data stored for a single-choice question is the option ID, also known as the number of the option selected (i.e., a '1' for Yes, or a '2' for No at question A1). After you've tested the survey and input data, use a Response report that contains A1 to confirm this data structure. |
In Excel or SPSS data files, each single-choice question is allocated one column of data storage. For example, question A1A's data will constitute one column in the dataset, containing values of '1' to '8' as a response (or left empty for a non-response). Export survey data in Excel (via the Deliverables applet) to confirm. Tip! An Excel export contains both a Data and a Questions tab. The Questions tab can be used as a "key" for option number information at each question. |
In ASCII data files, the length of the option ID defines the number of columns needed to store the response. If the question has option IDs 1 to 9, one column of data will be allocated. If the question has option IDs 1 to 99, two columns will be allocated. If the questions have option IDs 1 to 999, three columns will be allocated, and so on. |
Tip! The text in the various reports, both on-screen and in exported files, is derived from the question and answer option text. To modify the text used for questions or options, use the desc
tag for questions or the desc
decorator for options.
Multiple choice questions
Type checkbox and listbox questions allow the selection of multiple responses from a list of options, creating multiple choice, closed-ended questions. The questions in this section use tags from the checkbox question widget.
Questionnaire Content | Discussion Details | Coded SPL |
A2. Of these, what colors do you like? [Select all that apply] |
A2 and A2A are standard The |
A2. Of these, what colors do you like? |
A2A. What 3 colors are most common for apples? [Select exactly 3] |
A The |
A2A. What 3 colors are most common for apples? |
A2B. What colors are grapes? [Select all that apply] |
An "other specify" option can be added using the By placing the "other" option directly on the question after the Tip! Always anchor "other specify" options, keeping them at the end of any randomized list. |
A2B. What colors are grapes? |
A2C. What colors are in a rainbow? [Select all that apply] |
An
Tip! Conversely, there is a
selectall tag that triggers the selection of all options. |
A2C. What colors are in a rainbow? |
A2D. Are any rooms in your home painted in these colors you like? [Select all that apply] |
To display previously selected options, we can simply reference the variable where they were selected. For example, A2D references A2 with 'optsfrom: QA2'. Referencing a question like this carries logic forward, so that only the colors selected in A2 are piped in (displayed) at A2D. Placing an |
A2D. Are any rooms in your home painted in these colors you like? |
A2E. Are any rooms in your home painted any of these colors? [Select all that apply] |
When an We'll cover the |
A2E. Are any rooms in your home painted any of these colors? |
A2F. What color decor accents do you prefer? |
A The Note: Text questions use the The |
A2F. What color decor accents do you prefer? |
Data storage for multiple choice questions
Run a bit more dummy data, and let's take a closer look through the lens of a new Excel data export and a refreshed Response report. Prepare these materials for reference, and read on.
Discussion Details |
Although Response reports are largely similar to a deliverable export, there are some notable differences. Response reports display the data for checkbox questions in a single column. If more than one option was checked, the options are presented as a comma-separated list. Exports display the data for checkbox questions in a multi-column format, where each option has its own column. Each column has a value of '1' (selected) or '0' (not selected). The column headers have the option number appended to the question number, such as 'QA2.1' for QA2, option 1. Additionally, exports have a second tab called "Questions" which map the question and option IDs to the values displayed in the column headers; Response reports do not have this tab. You can review this in more detail in the article Creating a new export. |
Multiple choice questions generate one data location per option, resulting in each answer option having its own column in an Excel export. The COLORS list contains eight options. Consequently, eight variables are created to store the data for a multiple choice question using the COLORS list, and an Excel export will have eight columns to store the data. For instance, QA2.1 is the storage for the color 'Black' on QA2. If a respondent selects 'Black' at this question, there will be a '1' in the data location QA2.1. If 'Black' is not selected, there will be a '0' in this location. QA2.2 is storage for the color 'Blue' on QA2. If a respondent selects 'Blue' at this question, there will be a '1' in the data location QA2.2. If 'Blue' is not selected, there will be a '0' in this location. This pattern continues for each color on the list for QA2, resulting in eight locations in total. |
The same conventions apply to A2A — eight data locations, QA2A.1 through QA2A.8, are created (one for each color), each containing a '1' for checked and a '0' for not checked. The rest of the questions in this section store data in the same fashion. This is the standard output format for multiple choice data. |
At A2B, the addition of the "other" option adds QA2B.97, storing a '1' when checked and a '0' when not checked. The A2B ends up with 10 data locations, eight for the colors and two for autoother. |
A2C includes an extra option, '99. None of these', making 9 locations for this one. Data for the "none" option is stored in QA2C.99. The |
A2D and A2E produce the same data output even though the options render conditionally for respondents. A full data structure is generated for every question to provide storage for any combination of responses. Logical conditions used to pipe options don't typically impact the data structure, only how questions render for the survey taker. Tip! It's also possible to specify a subset of options with square brackets '[ ]', commonly called includes/excludes. This impacts not only whether options are displayed at survey questions, but also dictates whether those options will even appear in the dataset. |
A2F is a listbox question. It generates standard output format for multiple choice data. This question has additional options for 'White', 'Brown', and 'Grey' added locally to the question, making a total of 11 columns in the dataset. |
Text entry questions
In this section, we introduce open-ended questions, also referred as text and textbox widgets. They allow respondents to type in responses freely.
The types of open-ended questions that can be created include short text responses, dates, passwords, and even file uploads. The datatype
tag is often used with text questions to establish specific data formats, such as whole numbers, email addresses, or alphabetical responses. Additionally, the textbox question type is used for longer, essay-style open ends.
Our SPL also allows for numeric input question types via type: number
and type: integer
. Number questions (type: number
) accept positive and negative whole numbers (integers) as well as decimals, whereas integer questions (type: integer
) do not accept decimals. The datatype
tag can also be incorporated as necessary to modify the type of numeric value permitted.
Questionnaire Content | Discussion Details | Coded SPL |
A3. What color is your hair? |
The The Tip! Setting a |
A3. What color is your hair? |
A3A. What is the most common color you dye your hair? |
Use the Tip! The |
A3A. What is the most common color you dye your hair? |
A3B. How many times a day do you wash your hair? |
A The Note: If a |
# 'type: text' method |
A3C. For classification, what is your ZIP code? |
ZIP codes may be used to derive state, region, and other geographic data. It's easy to add US geographic classifications to your dataset with the uszip5 question type. By specifying |
A3C. For classification, what is your ZIP code? |
A3D. Where can we email our hair care instructions? |
Survey questions may solicit information such as a person's name, email address, phone number, and other personal details. This type of data, known as personally identifying information (PII), is subject to specific protocols and guidelines. For the purposes of this exercise, let's assume that you have obtained permission to collect a respondent's email address and phone number. You may use |
A3D. Where can we email your hair care instructions? |
A3E. Best number to reach you? |
Use The phone datatype defaults to allow multiple formats such as dashes, dots, parentheses, spaces or no spaces, as long as a full 7 to 10 digit number is entered. |
A3E. Best number to reach you? |
A3F. What is/was the date of your appointment? |
Using This question type uses a date-picker control to limit responses. Additional tags may be used to restrict responses to a specific time period or days of the week. |
A3F. What is/was the date of your appointment? |
A3G. Please explain how you wash your hair in full detail. |
A textbox question, or Tip! Allow respondents to see how much space is remaining in a textbox by using the characters remaining feature. As in a |
A3G. Please explain how you wash your hair in full detail. |
Caution! PII must be handled in accordance with specific protocols. Neglecting to implement necessary precautions to safeguard PII can lead to legal consequences. Contact a Support agent by clicking "Submit a request" at the top of any documentation page, using the Help modal below, or emailing help@intellisurvey.com.
Data storage for text entry questions
Discussion Details | |
For the "decline to answer" feature at QA3A, a QA3A_DTA variable location is created for the DTA field, which will have a value of '99' when selected and is left blank when not selected. By default, the |
|
In terms of the data at A3C, because it's a uszip5 question type, the result is a field with 5-digit numeric responses. The six additional associated geographic classification questions are all single-select, closed-ended variables that appear in the dataset just after the ZIP question. They would be labeled as QA3C_STATE, QA3C_REGION, QA3C_DIVISION, etc. |
|
In the dataset, the email datatype retains the data exactly as it was input by the respondent, however email and phone are two datatypes for which data is automatically encrypted. |
|
Although the phone datatype at A3E allows for various formatting options upon entry, the data is stored in the XXX-XXX-XXXX format, where the X's represent the digits. |
|
A value entered at a Tip! If you need to manipulate the default date format to display it differently elsewhere, see Referencing a 'type: date' question. |
Tip! When the maximum length of a textbox question is left undefined, the default of 5000 characters can be space consuming in the dataset. Consider adding a maxlen
tag whenever possible.
Practice what you've learned
Now that you've had a chance to upload and work with many of the most common question types, test your knowledge by completing a new short survey. Open the MR Industry Jargon Survey.docx file linked at the bottom of this page, and take a moment to review it before you begin.
Note: Create a new survey. Use "FLast_jargon" as a survey ID, and enter "First Last Jargon" as the description.
The skills you learned above can be used to create this Industry Jargon Survey. It has a few simple radio and text questions, some checkbox questions, numeric open-ends, and a few variations of common question styles found in surveys.
A few new concepts are used in this practice survey as well. The linked instructions below provide details that will help you along. Many of these features are covered again in later tutorials.
- The terminate instruction at S1
- The question text piping at S5
- The randomize order instruction at S9 and S10
- Alphabetizing order for the list on S11
- The skip and auto-code instruction with
set value
at S15, orautocode
- Set up new image upload abilities on S16.
Submitting and publishing code
When you are ready to submit your source code, click the Save Version button found in the top-right of the screen.
This presents a version comparison between the last compiled (built) version and the proposed edits. Changes that removed content will be in red, and changes that added content will be in green. It is best practice to review your changes and scroll from top to bottom. If the changes are correct, you are ready to parse (process) and update the survey. Click Commit Changes to continue.
If the new code compiles without any errors, this is when your "Draft" version is created.
You can submit code changes as many times as needed without publishing the survey. Remember, however, external testers or real respondents using the published "live" link will not see any changes until the latest survey version has been published. When the survey is approved and ready to "go live," the survey must be published.
When a survey is ready to be published, either for the first time or to push new changes to the live survey, click the Publish Survey button. This button is found at the top-right part of the screen for every applet and tab of your survey.
For detailed information on submitting and publishing your survey code, see Submitting and publishing SPL content. For a review on the Draft/Pub framework, see Draft and Pub versions.
Comments
0 comments
Please sign in to leave a comment.