1. Home
  2. Docs
  3. Addons
  4. Logic

Logic

The Logic addon for Quiz and Survey Master allows you to add conditional logic on questions to hide or show different questions based on the response to the previous question.

You can set the addon to show a question when another question’s answer is equal to a certain answer or if it is not equal to a certain answer. You can also show or hide a question if the selected answer is greater than or less than a given value.

Note: We have Disabled the Logic rules for Auto Pagination, meaning – You cannot use Logic Addon when Auto Pagination (Questions Per Page option) is Enabled in the Options Tab of Quiz and Survey Master Plugin. If you have created a Quiz with Auto Pagination Enabled along with the Set Logics for that particular quiz then the Set Logic Rules will be ignored for that particular Quiz.

Logic Database Schema Upgrade Notice!

With Logic Addon v2.0.0 Update we have completely revamped the UI and upgraded the database schema for better performance and high security. Once you upgrade to v2.0.0 or higher from any of the lower versions, all the logic data will be converted and stored in accordance with the new Database Schema and you won’t be able to roll back to the previous logic version.

INSTALLATION/SETUP

Once you have purchased the addon, you will have access to download the addon. To install, simply upload the addon as a normal WordPress plugin. To do so, go to the Plugins page and click Add New. Then, click Upload. From there, upload the zip file that you downloaded when downloading the addon.

Once the addon has been uploaded, you should now have the plugin QSM – Logic listed in your list of plugins. Activate that plugin. Once activated, the plugin will add an option in the Quizzes/Surveys list labeled Logic.

SETTINGS/CONFIGURE

Quiz and Survey Master - QSM Logic Addon - Adding License Key
Quiz and Survey Master – QSM Logic Addon – Adding License Key

First, enter your license key from your account into the “Addon License Key” field on the “Logic” tab of the “Addon Settings”. Be sure to click “Save Changes”.

Once you have the license key entered, you can then use the new “Logic” tab when editing your quiz or survey.

In the new Logic tab, you will see the Logic page. Initially, the Logic Page will be blank saying “You don’t have logic rules“. You need to hit the Create New Rule Button to set new Logic Rules to the Quiz.

Quiz and Survey Master - Logic Addon - Configuring the Logic
Quiz and Survey Master – Logic Addon – Configuring the Logic

On this page, you will need to add the Logic Rules. The Addon allows you to show or hide a question based on the user’s answers in the previous question. As seen in the below example

QSM Logic Addon - Adding New Logic Rules

The following questions could all be hidden until someone selects an answer in the ‘how many rooms…’ question like, ‘Do you have a garage?’, ‘Is your house more than 5 years old?’, and so on.

Section 1 (When This Happens):

Click on “Select a question” to select the question that you have in your question bank. Next for the condition, you will then have the following options ‘is equal to’, ‘is not equal to’, ‘is greater than’, ‘is less than’, ‘is empty’, and ‘is not empty’.

  • ‘is equal to’ is used when the test taker selects the answer specified.
  • ‘is not equal to’ is used when the test taker does not select the answer specified.
  • ‘is greater than’ is used if the answer contains numbers and the rule will perform the action specified if the answer is greater than the answer specified.
  • ‘is less than’ is used if the answer contains numbers and the rule will perform the action specified if the answer is less than the answer specified.
  • ‘is empty’ is used if the answer field is blank or kept unanswered.
  • ‘is not empty’ is used if the answer field is not blank or has a random answer

And then select the answers that are listed in the question that you have chosen.

Next, you can add AND conditions for more specific conditional branching. For example, if you want to show a specific question only if the user answered “yes” to a previous question, you would add an “and” condition, select the previous question as the basis for the logic, and then select the “yes” answer as the condition that must be met for the question to be shown.

Section 2 (Do This/Then Section):

Once you select all of your options under the ‘When This Happens’ section, it is time to move on to the ‘Do This’ section. In this section, you can choose to either ‘show’ or ‘hide’ any one of the other questions listed in your test bank.

Once it is set up, make sure to click the ‘Save’ button to save all the changes.

You also have the option of creating additional conditions to go with a rule and also additional actions. This will add specific and limiting conditions to the rule that you have already created and additional rules as well that will only affect the questions you have selected in the rule

Below is a screenshot of the final output:

Logic Addon Final Logic

If you would like to create a rule for multiple questions or for all of your questions, click the ‘Add Rule’ button on the top of the Logic page.

New Feature: Added additional condition for Email templates for different answers

Added additional condition for Email template for different answers
Added additional condition for Email template for different answers

With the latest Logic Addon update we have introduced additional condition support for the Email Templates of Emails Tab and Results Pages Tab of Quiz and Survey Master. Making the total usable conditions count to 3 which includes:

  • Total Points Earned
  • Correct Score Percentage
  • Questions

Using this feature email templates and results page can be changed on the basis of the answer chosen for a particular question thus giving you total control over the quiz by allowing you to send customized emails to every user whose answers match with the set conditions. You can even select a particular quiz category.

Note: To use this feature you must be running Logic Addon v2.0.2 or Greater and QSM Core v7.1.16 or Greater.

ⓘ Is your Quiz Missing a Submit Button?

If your users face a similar situation where after successfully answering the quiz pages the submit button isn’t visible at the end or is replaced by the Next button then you can fix this issue by implementing any of the two methods feasible to you.

Method 1: Enable “Text after Quiz”

Add Text After Quiz

With this method, you can display a text after the quiz logic ends and this will bring up the Submit button at the last. To make use of this method go to Text Tab > General > Text after Quiz and Enter the text you would like to display. Adding text at the end will also guide the users on what to do next as well as solves the problem of Submit button missing as seen in the image below.

Last page logic

Method 2: Add a Last page that isn’t included in the logic

Last Page of the Quiz

With this method, you add a last page with a question that isn’t included in the quiz logic, keeping this page/question away from the logic makes the QSM plugin treat it just like a last page and this brings up the Submit button.

last page text without logic

This add-on can customize your quiz in a vast array of different ways! If you have any trouble implementing the logic rules or have more questions about the process, please fill out a support ticket by going to the WordPress dashboard and selecting ‘Help’ in the QSM plugin and our Support Guru will be able to help you.

End Quiz if Particular Answer is Selected

End Quiz - Logic Addon

Instantly end a quiz if particular answer is selected by the user. The option found in the “Then” section alongside “Show” and “Hide,” automatically submits the quiz when all conditions in the “IF” block are met.

To use this feature, navigate to the Logic Addon settings and select “End Quiz” in the “Then” section. Ensure that the specified conditions in the “IF” block are correctly defined, as the quiz will submit once all these conditions are satisfied.

Note that “endquiz” must be the sole action in the “Then” logic and cannot be combined with “Show” or “Hide.”

Educators & Professional Web Developers, Try QSM!

4.9 / 5
Over 1 million downloads

Subscribe to Our Newsletter

Get weekly updates, no spam guaranteed we promise ✌️