Leading Practices and FAQs
Want to see how to take projects from good to great? Check out our Leading Practice & FAQ Home Page!
Using Answer Option Logic, you can conditionally show answer options in compatible questions based on the rule(s) you set up. For example, you might want to remove the sign up date for a course once the date has passed.
Set Up An Answer Option Logic Rule
In this example, the below condition will only display the answer option May 1 if the current date is less than or equal to 2018-04-30. Handy!
- Edit your question.
- Click the pencil icon to the right of the answer option you wish to set up logic on and go to the Logic tab.
- Set up the conditions for displaying this answer option under Option Logic Rule.
- First, select a question from the previous page (or system variable such as date) that will be used in the IF part of the rule. In the case of a grid question, you will choose a specific row of the grid to use.
- Select the operator that will be used to evaluate the question. After you select your question, the system will apply the recommended operator for the question type you selected. For example, if the question you selected has preset answers, such as a Radio Button question, Alchemer will switch to the operator "is one of the following answers" along with a list of the possible answers from your selected question:
- Finally enter the value or values that are required to complete the rule.
- Click Done and Save Question.
Answer Option Logic Workaround
Certain question types cannot be used as a source for answer option logic. One example of this is a Drag & Drop Ranking question. If you want to show/hide answer options in a follow-up question based on whether or not they were selected in the ranking (or other incompatible) question, use the below workaround.
- In our example, we ask our respondents to rank their preferred support channels in order of preference (the respondent is asked to rank their top three out of a possible six).
- We then want to ask a follow-up Checkbox question to see which of the ranked methods the respondent has used in the past month. We only want to include the ranked items in the list of answer options.
Since the Drag & Drop Ranking cannot be used as a direct source for answer option logic in the Checkbox question, we have to feed the ranked items into a Hidden Value so that we can use them to trigger answer options in the Checkbox.
- Once we have created our Drag & Drop Ranking question, we add a page directly after this question and set this page to auto-submit. This ensures that the page is not presented to a survey respondent.
- On this new page, we add a Hidden Value action. It's good practice to give this hidden value a meaningful title such as 'capture answers from ranking question'. The Hidden Value will be used to capture the answers from the ranking question on the previous page.
- Within the Hidden Value, we use the Select a Merge Code tool, to insert the merge code for the Question Answer of our source question. The Hidden Value will now capture all of the ranked items from our Drag & Drop as a comma separated list (ex. Social Media,Live Chat,Phone).
- Now, we can edit our follow-up Checkbox question (this question must be on a page after the auto-submitted page). Remember, our follow-up question must have all of the same answer options as our initial ranking question.
- Next, we edit the first answer option in our Checkbox question and click on the Logic tab. For example, the first answer option in our Checkbox question is Social Media. We only want to show this option in the checkbox question if it was ranked in the ranking question.
- From the Select a Condition dropdown, we cannot choose our ranking question. Instead, we must choose the Hidden Value from our auto-submitted page. Remember, the Hidden Value captures a comma separated list of the items that were ranked in our initial question.
- Because the ranked items are passed into the Hidden Value as a list, we must use the contains operator to evaluate whether a piece of text is in the list.
- Last, we must type in the text of the answer option exactly as it appears in the both the initial and follow-up questions.
- Our finished answer option logic condition looks at our Hidden Value and evaluates whether the answer option that should be shown is contained in the list that was captured by the Hidden Value. If the answer option is in the list, it will be shown in the Checkbox question.
- We repeat this process for each answer option in our Checkbox question.
See this in action in our Example Survey!
Answer option logic is not compatible with the below piping features. Learn more about Alternatives to Piping.
The answer options in the below questions can be conditionally displayed based on questions on previous pages.
The rows of the below questions can be conditionally displayed based on questions on the same page.