Skip to main content

Questions

Common Question Attributes

Avicenna supports 14 question types. Each question, regardless of its type, has the following attributes:

Question ID

Each question is automatically assigned a numerical ID unique within the Survey. This ID is used to uniquely identify the question or reference it when writing Criteria. It is not related to the order of the question within the Survey.

Question Type

The type of question is a property of the question which you can change. This enables you to quickly change the type of a question, for example, from Single Answer to Multiple Answer or from Audio to Audio/Text.

Variable Name

When a participant answers a question, their input is typically stored as a value in a variable. The name of this variable can be modified according to your needs. For example, if the question is asking for the participant's age, the variable name could be set to "age" by you.

Criteria

The Criteria field is an essential component of a dynamic Survey, as it allows you to set specific conditions or rules that determine whether a particular question should be displayed to the participant or not.

For more information on how to use Criteria on Survey questions in Avicenna, check Flow Control

Question Content

The content of the question is to be shown to the participant. This content supports a limited set of HTML tags and may contain zero or more videos or images. You can also use placeholders in your content which will be replaced by their value before Avicenna shows the content to the participant.

Mandatory

This determines whether the response to a particular question is mandatory or not. Participants have to provide an answer to the mandatory question before they can continue to the next question. If the question is marked as optional, participants can skip answering the question.

Enabled

This field lets you choose whether the question is, by default, enabled or disabled. If a question is disabled, it will not be presented to the participant, and the participant can continue the Survey without answering the question, even if it's mandatory.

The Enabled status of a question can be linked to a potential answer in a given Single Answer or Multiple Answer question. This way, if the designated answer is selected by the participant, the question will be enabled; otherwise, it will be disabled. You can read more about this in the Enabling/Disabling Questions section.

Answers Properties

Each Multiple Answer or Single Answer question contains a list of possible answers, which will be presented to the participant. Each of these answers, in turn, has certain properties that define if and how selecting that given answer should modify the Survey flow. The following image shows a Multiple Answer question with five answers, and you can see the properties of the first answer marked in the Properties tab:

Answers Properties of Multiple Answer Question

Answer Type

Answers can be as text or as an image. If you prefer to use an image for a given answer to a Multiple Answer or Single Answer question, you simply can switch to the Image option and then upload the desired image instead of typing the text for that answer.

As you can see in the Answer Properties tab, in addition to an ID and type, each answer has other properties as follow:

Enable Questions

This property allows you to define a list of questions that should get enabled or disabled based on whether this answer is selected or not, respectively (as described here).

Next Section ID

This specifies the section which should be shown following the current section, given this answer is selected. The available options are:

  • No Change: Selecting or deselecting this answer should not change the current order of the sections. Therefore this answer has no impact on the Survey flow. This is the default option.
  • Finish the Survey: Selecting this answer will mark this section as the last section and will finish the Survey.
  • Section Number: Selecting a given section number will instruct Avicenna to continue from the section specified here.

You can read more about this option in the Flow Control section.

Question Types

Information

You can use Information questions to show blocks of text, images, or videos to participants. The content shown for this question, similar to the content of any other question type, supports basic HTML tags. You can format the text into paragraphs, style the text by using bold or italics, or add hyperlinks. The following image shows how the Information question is presented in the Avicenna app:

Information Question in an Avicenna Survey
Information Question in an Avicenna Survey

Multiple Answer

Multiple Answer questions provide participants with one or more potential choices from which they can choose zero or more as their response.

Note that if a Multiple Answer question is set to mandatory, participants have to choose at least one answer. Therefore, it's important to ensure provided choices cover all possible cases the participant may want to choose, including choices such as None of the above.

In addition to the common attributes mentioned above, a Multiple Answer question can have the following options:

Display Layout

Avicenna offers a set of options for the layout of Multiple Answers questions. This feature allows you to customize the look and feel of your questions based on the content of the available answers. For Multiple Answers questions, you can choose either Checkbox or Button layouts. To set it, make sure your question is selected. Then, open the Properties tab from the right side. Find the Display Layout dropdown menu and select the appropriate layout.

Display layout options for Multiple Answers questions

The following two images show the Multiple Answers question layout in each case.

The Checkbox layout for Multiple Answers questions

The Button layout for Multiple Answers questions

Maximum Choices

Using this option, you can specify how many choices participants can select at most to answer this question. Participants can select any number of choices between zero (or one, for mandatory questions) and this number as part of their response.

Exclusive Answer

Using this option, you can specify the answer that, when selected, deselects all the other answers, and when any other answer is selected, it would be deselected.

Answer Randomization

You can randomize the selection of the answers within your question using the options available in the Answer Randomization. The random selection allows you to choose a subset of answers within your question using the Included Answer ID(s) option and also choose a Selection Count. Using this, besides the answers that are not part of the Included Answer ID(s), only a subset of the specified answers will be used to construct the question, where the size of the subset is the same as the Selection Count.

For example, assume your question has seven answers, with IDs from 1 to 7. Also, assume the Included Answer ID(s) is set to 3, 4, and 5, and the Selection Count is set to 2. With these settings, answers 1, 2, 6, and 7 will always be part of the question, and from answers 3, 4, and 5, only two randomly selected answers will be used to construct the question.

Random Answer Order

You can enable the Random Answer Order option. Doing so will randomize the order in which these answers are displayed.

Please note that these randomizations happen only once for each Survey session whenever the corresponding Survey is opened.

Suggested Answers

There is a button above the answers in the Edit mode called Use Suggested Answers. After clicking on that button, you will see a list of all available suggested answers. By selecting any of them and confirming your decision, the existing answers and their localizations (if any) will be replaced by the answers you just selected. In the image below, Age as a suggested answer is chosen.

Suggested Answers

Adding/Updating Multiple Answers Contents At Once

Other than the Suggested Answers option, you can add/update answers by pasting a multi-line text into one of the existing answers. When you paste your text, if the number of non-empty lines after removing extra spaces from the start/end of each line, is less than 2, your text will be pasted as usual. Otherwise, the Paste Multiline Text dialog would be opened in which you would have three modes to choose from:

  • Create new answers: It will create new answers based on the non-empty lines in your text after the focused answer.
  • Override answers: It will override the answers with the non-empty lines in your text, including the focused answer. Also, it will create new answers if the number of answers from the focused one to the end is less than the number of those non-empty lines.
  • Override empty answers: It will just override the empty answers starting from the focused one forward. When it reaches a non-empty answer or the end, it will create new answers at that point.

Single Answer

Single Answer questions provide participants with one or more potential answers and allow them to choose only one of them. In addition to the common attributes mentioned above, a Single Answer question can have all the attributes a Multiple Answer question may have, except the Maximum Choices. You can also add/update multiple answers contents at once or use suggested answers, as explained above.

Single Answer Questions in an Avicenna Survey
Single Answer Questions in an Avicenna Survey

Display Layout

Similar to the Multiple Answers questions, Avicenna offers a set of options for the layout of a Single Answer question. You can choose Radio Button, Button, or Dropdown layouts for Single Answer questions. To set it, firstly, make sure your question is selected. Then, open the Properties panel from the right side. Find the Display Layout dropdown menu and select the appropriate layout.

Display layout options for a Single Answer question

The following three images show the Single Answer question's layout in each case.

The Radio Button layout for a Single Answer question

The Button layout for a Single Answer question

The Dropdown layout for a Single Answer question

Text

In this type of question, participants are provided with a text box where they can type in a text as their response. In addition to the common attributes mentioned above, a text question can have the following attributes:

Format

Defines a specific format for the response. The value is a regular expression which the provided answer will be matched against. If not provided, any answer will be accepted. For example, in the screenshot below, the format is specified as ^[a-zA-Z][a-zA-Z][a-zA-Z]$; hence only three-letter alphabetical strings will be accepted.

Text Question in an Avicenna Survey
Text Question in an Avicenna Survey

Hint

A hint is to be shown to the participant for their response to this question. This string will be shown inside the textbox while it's still empty. It’s a good practice to use a descriptive hint when a given Format is used. For example, in the screenshot above, the hint is set to ABC to indicate that a three-letter alphabetical string is expected.

Type

If it's set to Single Line, the participant would be forced to enter a single line of text as their response. The other option is Multi Line which is the default option.

Autocomplete Options

This option allows you to specify a set of options that participants are very likely going to enter as their response to this question, and Avicenna will provide them to the participants through an autocomplete user interface. Note that this option is only available for single-line text questions.

To set the Autocomplete Options, click on this item in the Properties panel to open the Autocomplete Options dialog, and then enter each option in a separate line:

Text Question Autocomplete Options
Text Question Autocomplete Options

If you set these options, participants will be prompted with the proper options as they start typing their answers to the question:

Text Question Autocomplete Options Phone Example
Text Question Autocomplete Options Phone Example

Use Past Answers for Autocomplete

If you set your question to show autocomplete options, participants still may enter an answer which is not part of the options you have provided them. In this case, you can instruct Avicenna to automatically add the provided answer to the participant's auto-complete options. In this case, all participants start the study by seeing the same set of options you have provided them via the Autocomplete Options. But as they enter different values as the response to this question, their responses will be added to the set of options, and each participant will receive autocomplete options customized based on their previous responses.

Number

Number questions provide participants with an option to pick a number as their response. In addition to the common attributes mentioned above, Number questions may have the following attributes:

Step

In addition to typing the number, participants have the option to change the selected number by pressing the up or down arrow (as shown in the image below). Each press on the top and down arrow increases or decreases the selected value by the amount specified here. For example, if the question asks about age, each tap on the up or down arrow can increase or decrease the shown value by one year.

Minimum

The minimum acceptable value as an answer.

Maximum

The maximum acceptable value as an answer.

Default

If provided, pressing up or down button starts the increment or decrement from this value. If skipped, the maximum of 0 and the Minimum value will be used.

Display Unit

The unit for this number. The text specified here will be shown next to the number selected by participants. For example, in the screenshot below, the Display Unit is set to Years.

Number Questions in an Avicenna Survey
Number Questions in an Avicenna Survey

Mass

Mass questions provide participants with an option to pick a Mass value (in KG or LBs) as their response. Using Mass questions instead of simple Number questions where possible not only provides a better user interface for participants but also simplifies the analysis in many ways, such as unit conversion. In addition to the common attributes mentioned above, a Mass question can have the following attributes:

Unit

The default unit of the response. It can be either kg or lbs.

Step

Similar to Number questions, this allows participants to increase or decrease the value shown by the specified amount.

Minimum

The minimum acceptable value as an answer is in the default unit.

Maximum

The maximum acceptable value as an answer is in the default unit.

Default

See Number questions.

Mass Questions in an Avicenna Survey
Mass Questions in an Avicenna Survey

Length

Length questions provide participants with an option to pick a length value (in metric or imperial) as their response. Similar to Mass questions, using Length questions instead of a simple Number question where possible not only provides a better user interface for participants, it also simplifies the analysis in many ways, such as unit conversion. In addition to the common attributes mentioned above, a Length question has the following attributes:

Unit

The default unit of the response. It can be either cm for metric or ft_in for imperial.

Step

Similar to Number questions, this allows participants to increase or decrease the value shown by the specified amount.

Minimum

The minimum acceptable value as an answer is in the default unit.

Maximum

The maximum acceptable value as an answer is in the default unit.

Default

See Number questions.

Length Question in an Avicenna Survey
Length Question in an Avicenna Survey

Visual Analog Scale (VAS)

Visual Analog Scale (or VAS, for short) questions provide participants with a slider that they can use to choose their response. By default, the number chosen by the participant is shown above the slider. Optionally you can define a label for each range of numbers (e.g., Too hard for answers between 0 to 2), and the slider shows the label for the responses in that range.

In addition to the common attributes mentioned above, a VAS question can have the following attributes:

Layout

If set to "Vertical", Avicenna will show a vertical slider instead of a horizontal slider. For vertical sliders, the bottom represents the minimum value, and the top represents the maximum.

The following images show the VAS question with image anchors in horizontal and vertical layouts.

A VAS Question with a Horizontal Layout

A VAS Question with a Vertical Layout

Maximum

The upper bound for the number that participants can choose. It can be any number greater than or equal to Minimum + 1. Defaults to 100. Maximum will always be selectable even if it's not reachable by the Steps from the Minimum.

Minimum

The lower bound for the number that participants can choose. It can be any number less than or equal to Maximum - 1. Defaults to 0.

Step

You can use this attribute to specify how many steps the slider should jump every time the participant moves it. By default, the slider moves by 1 step in either direction on each move. Steps start from the Minimum value. So, if you set the Step to 6 and the Minimum to -100, the first step would be -100, and the next one would be -94 if the Maximum is greater than or equal to -94.

Show Selection Value

In the context of VAS questions, Show Selection Value refers to displaying the numeric value associated with the respondent's selection on the VAS scale. When a respondent selects a point on the scale, this feature will show the numeric value of their selection, providing immediate feedback on their choice.

Anchor Type

Anchors in a VAS question allow you to set labels to each end of the slider of the question and describe each spectrum better. Avicenna offers text and image as two options for anchor type. This can be applied to VAS questions with both horizontal and vertical layouts.

If Text is selected, you can write a text in the fields provided for the left and right anchors. If you intend to add images to the anchors, you need to select Image as the anchor type.

Text Anchors\ To add texts as anchors, make sure your VAS question is selected, then open the Properties menu from the right-side panel, select Text for the Anchor Type, and write relevant text for the right and left anchors.

Selecting Text as Anchor Type in VAS Questions

Image Anchors\ To add images to the anchors of the VAS question, simply set the Anchor Type to Image and upload images for the right and left anchors.

Selecting Image as Anchor Type in VAS Questions

Right Anchor

This text will be shown on the right side of the anchor (or on the top of the anchor, if a vertical layout is used) of the VAS question. Defaults to empty text.

Left Anchor

This text will be shown on the left side of the anchor (or on the bottom of the anchor, if a vertical layout is used) of the VAS question. Defaults to empty text.

Show Selection Label

Selection labels are spaced and placed along the length of the VAS line. These labels are important because they provide more nuanced and specific information about the range of responses the VAS question is measuring.

Just like the anchors, the labels can also have Text or Image type. After choosing the type, there are two fields to be filled in. The Label and the Lower Bound. You do not specify the upper bound here. Rather, the upper bound is calculated as another element's lower bound. For example, consider a VAS question, that measures satisfaction with a product or service, the slider is set to accept numbers from 0 to 100, and the labels are set to the following:

Very dissatisfied -> 0
Somewhat dissatisfied -> 20
Neutral -> 40
Somewhat satisfied -> 60
Very satisfied -> 80

If the participant moves the slider to select any number between 0 and 19, the label Very dissatisfied will be shown. If the participant moves the slider between 20 and 39, the label Somewhat dissatisfied will be shown. Similarly, the labels Neutral, Somewhat satisfied, and Very satisfied will be shown for choices between 40 to 59, 60 to 70, and 80 to 100, accordingly.

Visual Analog Scale Question in an Avicenna Survey

Calendar

Calendar questions allow participants to select a date, a time of day, or a combination of date and time, as their response. It also supports selecting a time or date period.

Calendar Question in an Avicenna Survey
Calendar Question in an Avicenna Survey

In addition to the common attributes mentioned above, a Calendar question has the following attributes:

Selector

Determines whether this Calendar question should allow participants to only pick dates, only pick a time, or pick a combination of date and time.

Minimum

The minimum value this Calendar question can accept. This only limits the day the participant can select (assuming the Selector is for Date or Date/Time), and the participant can select any time they prefer. Therefore if the Selector is Time, this value will be discarded. If the minimum day is expected to be the day the participant answers the question, check Use participant's today in the Properties panel. This way, the minimum date will be the current date when the participant is answering the question.

Maximum

The maximum value this Calendar question can accept. This only limits the day the participant can select (assuming the Selector is for Date or Date/Time), and the participant can select any time they prefer. Therefore if the Selector is Time, this value will be discarded. If the maximum day is expected to be the day the participant answers the question, check Use participant's today in the Properties panel. This way, the maximum date will be the current date when the participant is answering the question.

Period

If selected, the participant will be asked to choose a period rather than a single time. The start and end of the selected period will depend on the Selector, and it can be either:

  • A date range, e.g. Jun 1st, 2019 to Jun 5th, 2019
  • A time range, e.g., 10:30 to 13:50
  • A date and time range, e.g. Jun 1st, 2019 10:30 to Jun 5th, 2019 13:50

Minute Interval

The time interval the participant can choose. The options are 1, 5, 10, 15, 20, 30, and 60. If set to 1, the participant can pick any minute of a given hour. If set to 15, the participant can only choose the quarters, i.e., 10:00, 10:15, 10:30, and 10:45. If set to 60, the participant can only choose hours, e.g., 10:00 or 11:00.

Image

Image questions allow participants to take a picture as their response. Alternatively, they can choose a previously captured image from their device's image library.

Image Question in an Avicenna Survey
Image Question in an Avicenna Survey

Video

Video questions allow participants to capture a video as their response. Alternatively, they can choose a previously recorded video from their device's video library.

Audio

Audio questions allow participants to record an audio as their response. Alternatively, they can choose a previously recorded audio from their device's audio library.

Audio Question in an Avicenna Survey
Audio Question in an Avicenna Survey

Audio/Text

Audio/Text questions provide participants with the option to either type their response or record it as audio using the microphone. Many attributes available to Audio/Text questions are similar to the ones for a Text question.

Audio/Text Questions in an Avicenna Survey
Audio/Text Questions in an Avicenna Survey

Barcode

Barcode questions allow participants to scan a barcode or QR code as their response. The following image shows the user interface for Barcode questions in a Survey. When a participant presses the Scan Barcode button, Avicenna will start the camera, allowing the participant to scan the barcode. The value of the barcode will be shown to the participant and taken as the response to the question.

Barcode Question in an Avicenna Survey
Barcode Question in an Avicenna Survey

Adjusting Question Content

Font and Text

The font and text size of the Survey is chosen based on the default font and text size of the device. This will provide the participant with a consistent user interface as experienced in the rest of their apps. Avicenna offers a few options to refine this for each question. For example, a text can be set to be shown slightly larger or smaller than the device’s default text size, or it can be set to be bold or italic. These changes can be done using HTML tags in the question content. Avicenna currently supports the following HTML tags as part of the question content:

p, ul, ol, li, div, span, strong, b, em, cite, blockquote, dfn, i, small, code, pre, a, u, del, s, sup, sub, h1, h2, h3, h4, h5, h6, img, br

The text editor in the Survey Editor allows you to apply most of these modifications using a graphical interface:

Question Content Editor for Avicenna Surveys

Note that if you use a URL in your question content, the target link should be HTTPS. HTTP links may not work in some versions of Android and iOS.

Multimedia

Each of the questions described above consists of a content section, which includes the text of the question being posed. The content can include any combination of text, images, and video. To add images, simply click on the image icon in the editor toolbar, and upload your image from your computer. For video, Avicenna only supports videos from YouTube. You need to upload your video to YouTube first and then add its link to your question content using the editor.

Adding Video to Your Question Content

Avicenna will add a video player to your question content and loads the video thumbnail in it, as shown below:

Question Content with a Video

Note that even though Avicenna expects you to upload your video to YouTube and provide the link, the Avicenna app will not ask the participant to open the YouTube app to see the video. The video player will be fully embedded in Avicenna's Survey question. Here, YouTube will only host the video and provide it to Avicenna to be played for the participant.

If your question content contains a video, Avicenna records all interactions participants have with that video. This includes how long, in total, the participant watched the video, e.g., 110 seconds. This may be longer than the video length, which means the participant watched parts of the video more than once. It also includes how the video was watched. This will be the start and end time of each watch session. For example, assume the video is 120 seconds, and the participant watches it from 0 to 30th second and then jumps to 75th second and watches to the end. In this case, you will get an array as follow:

[
[0, 30],
[75, 120]
]

Integrating Audio into Survey Questions

You can attach an audio file to each question in your survey. This allows participants to listen to the question instead of reading it. This feature can be very helpful for illiterate participants or those with reading difficulties.

Note that while many platforms offer screen readers that provides a similar feature, the screen reader is not available in all languages, and the pronounciation is not strictly controlled. The advantage of this feature over standard screen readers is that you can control exactly how the question's content should be read in each language that your study supports.

Uploading an Audio File

  • Initiate Audio Upload: Click on the Add Audio (Microphone) button located in the question's toolbar.

  • File Selection and Upload: Choose a .mp3 audio file. Make sure it does not exceed 30 MB. Confirm the upload by clicking the Add button to embed an audio player within the question content.

    Uploading an Audio for a Question

Using Previously Uploaded Audio

  • Select Existing Audio: In the Add Audio dialog, browse and select from the list of previously uploaded audio files.
  • Embed Audio into Question: Confirm the selection by clicking Add integrating the chosen audio directly into the question.

Recording Audio Directly

  • Start Voice Recording: Access the voice recording feature by selecting the Record Voice button within the Add Audio dialog.

  • Voice Recording and Integration: Record your voice. Recordings cannot be longer than 30 minutes. Finish and embed the recording in the question by clicking on the Add button.

    Recording Audio for a Question

Removing Audio from a Question

  • Audio Removal: To delete an embedded audio, position the cursor immediately after the audio player and press Backspace, removing both the audio and its player from the question.

Placeholders

In the Criteria section, we described how you could use Survey ID and Question ID to point to the last response to a given question and use that in your Criteria conditions. For example, Q1_2 refers to the last response to question 2 of Survey 1.

You can use a very similar format in your question content as a placeholder for the last response to a Survey question, for example: {{Q1_2}}. If your question content contains such a placeholder, Avicenna will replace that with the last response the participant has provided to that question and then shows the question to the participant. For example, the following question content:

Hi {{user_fname}}. Which of the following steps are you going to take toward your social goal of “{{Q12_6}}”?

Assuming the response to question #6 of Survey #12 has been Making a new friend by going to the events you are interested in, the question above will be presented to the Participants as follows:

Hi Bill. Which of the following steps are you going to take toward your social goal of “Make a new friend by going to the events you are interested in”?

Currently, you can use placeholders for the response to questions of the following types:

  • Text
  • Audio/Text (only the Text part will be used)
  • Multiple Answer
  • Single Answer
  • Visual Analog Scale (VAS)
  • Number
  • Mass
  • Length
  • Barcode
  • Calendar

In addition to the placeholders referring to a given question, Avicenna also supports the following placeholders:

  • user_fname, user_lname, and user_name refer to the participant's first name, last name, and full name, respectively, as they provided to Avicenna during the sign-up.
  • loop_value refers to the value of the current iteration of the loop for loop sections. You can read more about loop_valuehere.