-
Notifications
You must be signed in to change notification settings - Fork 11
Home
QUEST – Questionnaire App – Documentation v0.6 7-23-20
-
The following response codes correspond with the following options:
a. 77 = Don’t Know
b. 88 = NA
c. 99 = Prefer not to answer
The length of these response codes is increased as needed to avoid confusion with codes for other possible responses or the limits for integer responses. For example, if there are 10 other response categories, 777 = Don’t know. If age is requested as an integer and the maximum age allowed is 150, then 7777 = Don’t know. -
#YN following a question indicates binary, 0 = No, 1 = Yes, response options.
-
#YNP following a question indicates 0 = No, 1 = Yes, 99 = Prefer not to answer, response options.
[TEXT], [TEXT#] – Brackets enclosing all upper-case text indicates the beginning of a text section (e.g. background information, directions) or a question. Numbers and underscores may be included, but there can be no spaces (e.g. A1, BQBCK_AGE_V1R0, INTRO). Text sections that are followed by response options will be read by the QUEST app as questions. Text included in the brackets will be used as the name for that question should it be referred to in other questions (i.e. for applying skip logic or piping an answer given for one question into the text of another question) and for the variable name for that question in the output. Text sections may contain spaces between paragraphs. A new text section or question will not be created until indicated as described above.
[TEXT!], [TEXT#!] - An ! following the text between brackets indicating a question is used when that question must be answered in order for the participant to move on to the next question. Also referred to as a hard edit.
[TEXT?], [TEXT#?] - A ? following the text between brackets indicating a question is used if a prompt to answer the question, should the participant skip, is wanted. Also referred to as a soft edit. The participant will still be allowed to move on to the next question even if the current question is unanswered.
-> TEXT – Skip logic is indicated with an arrow after the response variable to which the skip logic is applied. The text following the arrow is the name of the question displayed if the indicated response variable is selected.
{$ID} – To pipe a response from one question (e.g. A1) into the text of another question (e.g. A2) insert the id of the first question, preceded by a $, in curly brackets (e.g. {$A1}) into the text of the other question where the response should appear. Piped response can take optional text. Just add a : after the ID (e.g. {$A1:this is optional text}. If there is no value given for the id, the optional text will appear instead.
#currentYear - Is replaced with the current year in a question. #currentMonth - Is replaced with a numerical representation of the current month. Jan=1 ... Dec=12 #currentMonthStr - Is replaced with a 3 letter representation of the current month. Jan, Feb, ..., Dec
{$u:ID} – This allows for piped variable from inputs into quest. For example: {"AGE":"55"}
is the input value. To display this please use [Q1] You are {$u:AGE} years old.
|displayif= <condition>|text and piped reponses| - Pipe, displayif=, the condition that is required, pipe, the text that the user would like to be displayed, pipe indicates a conditional text.
Example: |displayif=equals(SEX,1)|Since you said Sex = 1, this is the example text to be displayed|
!|displayif= <condition>|text and questions|! - Pipe, displayif=, the condition that is required, pipe, the text that the user would like to be displayed, pipe indicates a conditional text or questions.
Example:
[SEX!] What was your biological sex assigned at birth?
(1) Female
(2) Male
(3) Intersex or other
[SEX2]
!|displayif=equals(SEX,1)|Please select the female body parts that you were born with. |__|id=femalebody| |!
!|displayif=equals(SEX,2)|Please select the male body parts that you were born with. |__|id=malebody| |!
|popup|buttonText|title|popupText| - Pipe, popup, pipe, Button text, pipe, Title, pipe, Popup text, pipe to insert an informational pop-up button and associated text into a question or other text block insert the name of the button (e.g. information, definition, term to be defined) in buttonText followed by an optional title for the pop-up and the text to be included in the pop-up in brackets.
Example:
|popup|Example|Title|Here is the pop-up text|
(#) - Parenthesis preceding response options indicate that only one option may be selected. This is also referred to as a radio button.
[#], [#*] – Brackets preceding response options indicate multiple options may be selected (i.e. Select All That Apply questions). The number can be followed by an asterisk (star) that mean if selected all other selections are cleared. Selecting any other option will clear the selection with an asterisk. Selection of an option will be recorded as a binary (1 = Selected, 0 = Not Selected) in the output for that question. This is also referred to as a check box.
Example:
[CONTINENTS] I have lived in the following continents
[12] North America
[13] South America
[14] Africa
[15] Asia
[16] Australia
[17] Europe
[18] Other
[19*] I prefer not to answer
In this question if the user selects I prefer not to answer, all other selected responses are de-selected.
|__|__| - Pipe, underscore, underscore, pipe, underscore, underscore, pipe indicates a numeric response.
|__|__|id=VARIABLENAME| - Allows for a variable name to be entered. Variable name has to be in all capital letters.
|__|__|min=# max=#| - Allows for a minimum and maximum number range for the number input.
Example: |__|__|min=0 max=100|
The min or max can take a previous Variable Name from a previous number input. Example: |__|__|min=AGE max=100| or |__|__|min=0 max=AGE|
Combined, every thing should look like |__|__|id=VARNAME min=0 max=100|
|__| - Pipe, underscore, underscore, pipe, indicates a free text response that is limited to a single line. Note, length of line is indeterminate unless otherwise specified.
|___| - Pipe, underscore, underscore, underscore, pipe, indicates a free text response that may wrap around to multiple lines. Note, length of response is indeterminate unless otherwise specified.
For all numeric and free text responses that are not part of a categorical response, the variable name for the response in the output is the same as the question name. Note, length of response is indeterminate unless otherwise specified.
[textbox: VARIABLE_NAME] - Bracket, the word "textbox", colon, Variable Name, bracket indicates a free texr response that may wrap around multiple lines
In order to create a response that is only able to be answered one or the other, the text response input needs to have an attribute called xor and a unique ID. (e.g. |__|__|xor=Q1 id=Q1_A| and the second element |__|__|xor=Q1 id=Q1_B|)
|date| - pipe, the word "date", pipe, denotes date entry. It takes an optional id (e.g. |date|id=DATE1|)
_TODAY_
is a reserved word for displayIf involving dates. It will return the current date, timezone adjusted, in the format of YYYY-MM-DD that can be used to compare against the date pope
|time| - pipe, the word "time", and pipe should create an input type of time. It takes an optional id (e.g. |time|id=TIME1|)
|SSN| - pipe, the letters "SSN" all caps, pipe denotes a 9 digit social security number entry. It takes a default pattern of ###-##-####, which is the default placeholder as well. To set the default pattern, set the markdown to |SSN|pattern=| to whatever pattern you would like. To set the default placeholder, set the markdown to |SSN|placeholder=| to whatever placeholder you would like.
|SSNsm| - pipe, the letters "SSNsm" all caps except "sm", pipe denotes a 4 digit social security number entry. It takes a default pattern of ####. To set the default pattern, set the markdown to |SSN|pattern=| to whatever pattern you would like. To set the default placeholder, set the markdown to |SSN|placeholder=| to whatever placeholder you would like.
|tel| - pipe, the letters "tel", pipe denotes phone number entry. It takes a default pattern of (###)-###-####, which is the default placeholder as well. To set the default pattern, set the markdown to |tel|pattern=| to whatever pattern you would like. To set the default placeholder, set the markdown to |tel|placeholder=| to whatever placeholder you would like.
|@| - Pipe, @, pipe, indicates an email address and entries are checked for a valid email format. It takes an optional id (e.g. |email|id=EMAIL1|)
|hidden|id=ID value=value| creates hidden variable that gets sent when the user see a question.
|image|URL|height,width| - Pipe, image, pipe, the image URL (without https:// attached), and as an optional input of the height of the image and the width of the image and concluding with another pipe.
The questionnaire doesn't actually loop, but rather unrolls the loop. The <loop> tag writes out the questions within the tag "max" times. The question Id are changed from QID to QID_#. A variable #loop, the loop index, is defined starting with the value of 1 for the first iteration of the loop. The displayif tag must be used in all questions within the loop to prevent questions from being displayed after the loop is completed. Typically, a question before the loop will provide the number of iterations.
<loop max = num> [QID, displayif=function(responseId,#loop)] ... </loop>
where function = {greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, equals}
[NAME] What is your name? [FST_NAME] First name |__| [LST_NAME] Last name |__| [AGE] {$FST_NAME}, how old are you? |__|__| [OWNER] Do you own a pet? #YN [PETS] Select from below all the animals you think make good pets. Select as many as apply. [1] Dogs -> BREED [2] Cats [3] Fish [4] Birds [5] Other: Specify [text box:otherpets] [BREED] List your favorite breed of dog |__| [WALK] How many times per day should a dog be walked? (1) Once per day (2) Two times per day (3) Three or more times per day (99) Prefer not to answer
Output for Sam Smith, a 38-year-old pet owner who selected Dogs, Fish, and Other, whose favorite breed of dog is a lab, and would prefer not to answer how many times per day a dog should be walked.
NAME | FST_NAME | LST_NAME | AGE | OWNER | PETS | 1 | 2 | 3 | 4 | 5 | OtherPets | BREED | WALK |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Sam | Smith | 38 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | rabbits | lab | 99 |
[NUMKIDS] Number of Children |__|__|id=numchildren| <loop max=20> [KIDNAME|firstquestion=#loop loopmax=numchildren|] What your {##} child's name? |__|id=kidsname| [KIDAGE] What is child # #loop's ({$KIDNAME}'s) age? |__|__|id=kidsage| < -> _CONTINUE > </loop> [END] Thank you