2009-08-03
QPL Reference Manual

Warning! This page is in the process of being rewritten for QPL Version 6. It may still have references to QPL Version 5.

Multiple choice questions, which only allow the respondent to select only one answer from a list, are the backbone of a self-administered web questionnaire. survey. Typically, they will make up the great majority of questions in a survey.

These questions can be used to make conditional skips to any question in the survey, according to which answer was selected. When the respondent selects an answer and clicks on the skip instruction, his or her browser will automatically skip to the question that has been linked to that answer. Thus, multiple choice questions also can be used to screen respondents and direct them into appropriate lines of questions.

.QUESTION [= name], TYPE = MULT
[.ALIGN [= LEFT* | CENTER | RIGHT] ]
[.ANUMBERING [= ON | OFF | "1" | "A" | "a"] ]
[.BOLD [= ON | OFF*] ]
[.INDENT [= ON | OFF* | #]]
[.LABEL = "label" ]
   ...
   ...
   ...
.ANSWER [= default answer number, or =  name]
[.GROUP = "label for group of answers"]
   ...
[.GOTO = name]
   ...
[!]...
.NEXT [= name]

Note: Items in square brackets are optional. Words in lower-case letters indicate the top of argument that is used and ellipses show where question and answer text lines are typed.

TYPE Command

The TYPE command must be set to "MULT."

Standard Question Layout

By default, multiple choice questions will be presented in a vertical layout with each answer listed on a separate row with a leading radio button.

You may optionally use a format tags to tell the QPL converter to display a question in a horizontal format. Here, the question text is displayed in the column on the left and the answers are used as column headings. Further, you may stack several questions together to create a "matrix" where the radio buttons are inserted in the intersection between the question text and the column headings. Format tags, however, can not be used to hide MULT questions.

ANSWER Command

The ANSWER command is required and is used to separate the question text from the list of responses. You may also use it to

The last item in the list will be checked unless you set the default to another number. (Note: This is a change from earlier QPL editions. Previously, the first item would be checked by default.) For example, if you have three items in your list and you want the second item to be checked, you would set the ANSWER command to 2.

You may also set the ANSWER command to 0 (zero) if you do not want any answers to be checked by default. Once the respondent clicks on an answer, that response will be checked. The respondent may move a check mark, but the respondent may not uncheck all of the responses (i.e., to put the question back into its origninal, unchecked, state.)

You should always use the last category to let the respondent indicate an answer that is not any of the above, such as "Don't know," or "No response."

.QUESTION = Q1, TYPE = MULT
   ...
   ...
   ...
.ANSWER = 0
Yes
No
Don't know
.NEXT

.QUESTION = Q2, TYPE = MULT
   ...
   ...
   ...
.ANSWER
Yes
No
Don't know
.NEXT

.QUESTION = Q3, TYPE = MULT
   ...
   ...
   ...
.ANSWER = 1
Yes
No
Don't know
.NEXT

In this example the ANSWER command is used to set different default response items. In question Q1, no items will be intitially checked when the respondent views the question in his or her browser because the ANSWER command has been set to 0. No particular answer has been set in question Q2 so it will be displayed with the last item, "Don't know," checked. Question Q3 will be displayed with the first item, "Yes," checked because its ANSWER command is set to 1.

If you will be repeating an answer list in two or more questions, you can simplify your programming by using the ANSWER command to copy the list from a previous question, including the default answer setting.

.QUESTION = Q4, TYPE = MULT
   ...
   ...
   ...
.ANSWER = Q1
.NEXT

In this example, question Q4 will be displayed with the same answer list as question Q1, and no responses will be checked by default because Q1's ANSWER command was set to 0.

GOTO commands (see below), however, are not copied. If you need to use GOTO commands, you must repeat the answer list again and insert the GOTO commands after the responses that need links.

Answer Lines

At least one answer line is required. There is no limit on the number of answer lines you may use, but each answer must be typed on a separate line and be less than 240 characters long.

You may specially highlight an answer line by putting the exclamation mark (!) format tag at the beginning of the answer line. This will cause that answer to be displayed with a grey background.

.QUESTION = Q1, TYPE = MULT
   ...
.ANSWER
Yes
No
!Don't know
.NEXT

1. ...
(CHECK ONLY ONE ANSWER)
1. Yes
2. No
3. Don't know

When used in a matrix layout, exclamation mark (!) format tag will cause the column for that answer to be shaded with a grey background. See Modifying the Standard Question Layout for more information.

You may also embed HTML codes within an answer line to emphasize words with bold, underlined, or italicized type or to contol line breaks. See Low-Level Formatting for more information.

Skip Instructions

Multiple choice questions can be used to direct respondents into particular lines of questions using the GOTO and NEXT commands. The GOTO command is used to link a question to a particular response. The NEXT command is used to skip to a particular question unless the respondent selected a response which has a GOTO command.

GOTO Command

A GOTO command is linked to a response by typing the command and the name of the target question on a line immediately following the response.

.QUESTION = Q1, TYPE = MULT
   ...
   ...
   ...
.ANSWER
Yes
.GOTO = Q6
No
Don't know
.NEXT

This question will be displayed in your browser as shown below.

1.
Q1
   ...
   ...
   ...
(CHECK ONLY ONE ANSWER)
1. Yes (GO TO QUESTION 2.)
2. No
3. Don't know

If the respondent checks "Yes," he or she can click on the "GO TO QUESTION..." link to skip to the appropriate question.

If the respondent checks another response, he or she should go to the next question in the list since no other skip instructions have been given.

If the respondent, however, does not check "Yes," but clicks on the "GO TO QUESTION..." link, the "Yes" response will be automatically checked before the respondent is skipped to the linked question.

The respondent is not forced, however, to go to the question specified by the skip instructions. He or she may still scroll and click on any response field he or she chooses. When analyzing your results, you should first check the skip paths (i.e., such as recoding all questions that are off the skip path to a missing value in SAS or SPSS). (Note: The skip paths are only enforced in one circumstance. If your questionnaire is contained on only one page and the respondent is using Microsoft Internet Explorer, then the response fields that are off the skip path will be disabled. The skip path is updated after the respondent completes each answer.)

Each answer in a multiple choice question may have a GOTO command attached to it.

You should not use GOTO commands in a multiple choice question if you will be using it in a matrix layout (since there is no room in the matrix to display the link). Any GOTO commands used this way will be ignored by the QPL convert that builds the HTML or PHP versions or your questionnaire.

Changing GO TO QUESTION...

If the target question is not numbered (i.e., you have used the "#" option), The "GO TO QUESTION..." phrase will automatically change to "GO TO SECTION:..." and insert the SUBTITLE that used used on the unnumbered target question. The SUBTITLE on the target question is used as a heading for that section in the questionnaire and is also used in the menu that is displayed in a frame to the left of the questionnaire that lets a respondent navigate from one section to another.

If the target question is not numbered and it does not have a SUBTITLE, then this phrase will automatically be changed to "GO HERE."

You can change the text used in these default phrases by assigning new phrases to their internal phrase numbers. See Changing Default Phrases for more information.

NEXT Command

The NEXT command is required to end a question. You may also use it to specify a skip to another question if you do not want the respondent to go to the next question in the list. A NEXT command is linked to a response by typing the command and the name of the target question.

.QUESTION = Q1, TYPE = MULT
   ...
   ...
   ...
.ANSWER = 0
Yes
.GOTO = Q6
No
Don't know
.NEXT = Q12

This question will be displayed in your browser as shown below.

1.
Q1
   ...
   ...
   ...
(CHECK ONLY ONE ANSWER)
1. Yes (GO TO QUESTION 2.)
2. No
3. Don't know
SKIP TO QUESTION 3.

In this example, the respondent will be skipped to question 3 unless the "Yes" response is checked. In this case, a message will be displayed to the respondent that says, "According to your response, you should go to question 2 next. Please click on the link to question 2."

The NEXT command skip instruction will only be displayed if the question you want to link to is not the next question in your program.

Changing SKIP TO QUESTION...

If the target question is not numbered (i.e., you have used the "#" option), The "SKIP TO QUESTION..." phrase will automatically change to "SKIP TO SECTION:..." and insert the SUBTITLE that used used on the unnumbered target question. The SUBTITLE on the target question is used as a heading for that section in the questionnaire and is also used in the menu that is displayed in a frame to the left of the questionnaire that lets a respondent navigate from one section to another.

If the target question is not numbered and it does not have a SUBTITLE, then this phrase will automatically be changed to "SKIP HERE."

You can change these default phrases by assigning a new phrase to the their internal phrase numbers to other phrases. See Changing Default Phrases for more information.

Accessibility

When a multiple choice question is displayed in the normal, or vertical, layout, each answer is linked to its radio button. A respondent using screen reading software to listen to your questionnaire will hear the answer that goes with the radio button that he is positioned on. A sighted respondent can click on the answer text to check its radio button, just as if they had clicked on the radio button itself.

When displayed in the matrix, or horizontal, layout, each radio button is instead labeled with a copy of the answer that is displayed at the top of the column. A respondent using screen reader software will be able to hear the label for particular button, while a sighted respondent will see the label when he hovers his mouse pointer over the a radio button.