This article will help you understand and use Optional Questions in your Questionnaire.
Optional questions are a set of questions that are displayed to the user on random, based on a probability value.
You can add one or more optional questions in each group and let the group decide which ones to display.
As we mentioned in a previous article, each group has a field called "maximum number of questions". This field determines how many questions of the group will be displayed to the end-user, in display order as they appear in the questionnaire design section.
Starting with the non-optional questions, group will include all the non-optional questions until it reaches the max or until they run out and then start selecting from the optional questions based on their probability. A group may select 0 or more optional questions until it reaches the max value.
You can mark a question as optional by setting Optional Switch to "on" and setting a probability, as it appears on the following screenshot:
You can either select one of the preset values:
or select Custom and fill in the probability of the question.
You can work with question probability in various ways:
Set a fixed probability for more than one questions and select a set of them.
Set auto probability for some or all of the questions
You can set your question a fixed probability based on the given preset values or a custom value.
NOTE: If the number of optional questions is less than the number of questions needed to fill the group, all questions will be selected. Only questions with 0 probability will be skipped.
Normally, the probability values should sum up to 100%, but you can sum up to less than that to leave room for not selecting a question.
Example:
From the above example, there is a 5% probability of not selecting any question.
With 2 questions left for the group, we could have the following steps:
There is 95% probability of selecting the first question
Select "Question 2"
There is 65% (95% - 30%) probability of selecting the second question
Select No Question
Or the following:
There is 95% probability of selecting the first question
Select No Question
There is 95% probability of selecting the second question
Select "Question 4"
With 1 question left for the group, if the sum of probabilities do not sum up to 100%, there is change that no question is selected.
You can set auto-probability to questions that you do not wish to have a specific probability but share the remaining probability equally. This allows you to:
Have as many questions as you like, with equal probability without editing the values
Have questions with auto probability and questions with fixed, to provide more weight
Example:
In the above example, "Question 3" and "Question 4" will share the remaining 20% over their count (20/2 = 10% each).
Assume we have a group with 5 maximum number of questions:
Example 1:
Example 2:
Example 3:
In the above example we can see that there is no question selected for no5. This is a probability that might happen if questions' probability do not sum up to 100%.
Example 4:
In the above example we can see that regardless of the display order, the non-optional questions will be selected first and then the optional questions.