Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
3 changes: 3 additions & 0 deletions docs/surveys/best-practices/google-reviews.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,6 +57,8 @@ Open the [Thank You card](/surveys/question-type/thank-you-card) at the bottom o

Every respondent now sees the review button after submitting.

![The ending card, with a button pointing at your Google review link](/images/surveys/best-practices/google-reviews/ending.webp)

<Note>
On Formbricks Cloud, custom external URLs in the Button URL field require a paid plan. This helps us prevent phishing. Self-hosted instances have no such restriction.
</Note>
Expand All@@ -67,6 +69,7 @@ To tailor the wording without gating the link, give low ratings their own ending
Duplicate rather than **Add ending**: a new ending starts with the Formbricks default button (`Create your own Survey`, pointing at formbricks.com), so you would have to enter the review link again — and if you miss it, low-rating respondents lose the link your anti-gating setup depends on.
</Note>


### 4. Share the survey at the right moment

Timing matters more than copy. Send the survey when the experience just happened:
Expand Down
100 changes: 34 additions & 66 deletions docs/surveys/best-practices/quiz-time.mdx
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,60 @@
---
title: "Quiz Time"
icon: "brain"
description: "How to Create a Quiz Using Formbricks - Step-by-Step Guide"
description: "Build a scored quiz with a variable, block logic and two endings."
---

# Creating a quiz with Formbricks - Step-by-step Guide
A quiz is a survey that keeps a running score and routes to a different ending depending on it. Everything it needs — a variable, conditional logic and multiple endings — is already in the editor.

Welcome to this guide on creating engaging quizzes with Formbricks! Quizzes help you capture customer insights, explore user personalities, or simply add fun for your team. With Formbricks, you can personalize quizzes in minutes add scores, customize backgrounds, and more, all without any technical skills!
## What you will build

## What we'll build
A trivia quiz that adds a point per correct answer and finishes on a pass or a fail card.

By the end of this tutorial, you'll have created a simple trivia Quiz featuring:
## 1. Create the questions

1. Score calculations.
2. Multiple endings depending on the score.
Open **Surveys**, click **New Survey** and choose **Start from scratch**. Leave the type as **Link survey**.

## Setting up the form
Add one [select-single](/surveys/question-type/select-single) question per quiz question, each with one correct choice among the options.

First, make sure you have a Formbricks account. If not, you can create one [here](https://app.formbricks.com):
## 2. Add a score variable

1. Head to the Surveys page and click on **New Survey**.
2. Select Start from Scratch to create a new form.
3. Go to the settings and select form type as **Link Survey**
4. In the form editor, click the three dots next to a question, then select Change Question Type and choose **Single-Select**.
Scroll to **Variables** below the question list and add a number variable called `score`, starting at `0`.

![Change Question type to Single-Select](/images/surveys/best-practices/quiz-time/single-select.webp)
![The Variables section with a score variable](/images/surveys/best-practices/quiz-time/variables.webp)

5. Add a welcoming statement to greet your users and explain the Quiz's purpose.
6. Personalize the greeting to make it inviting and encourage engagement.
## 3. Add a point per correct answer

**Note:** While we’re creating a Link Survey here, the process is similar for Web and App surveys.
This is the part the old version of this page got wrong, so it is worth being precise: **conditional logic belongs to a block, not to a question.** Scroll to the foot of the block, under the question list, and you will find **Conditional Logic** and an `Add logic +` button.

## Adding the questions
Add one rule per question:

Next, let's create a question for example with multiple options:
![A rule adding one to the score when the answer is correct](/images/surveys/best-practices/quiz-time/calculate.webp)

What country has the longest coastline in the world?
A) Canada
B) Japan
C) India
D) Nepal
Read it as a sentence: **when** the answer equals the correct choice, **then calculate** `score` `Add +` `1`.

![Sample Question](/images/surveys/best-practices/quiz-time/quiz.webp)
<Note>
A `Calculate` action can add, subtract, multiply, divide or assign. A quiz normally wants **Add +** on a
number variable — see [Conditional Logic](/surveys/general-features/conditional-logic) for the full set of
conditions and actions.
</Note>

## Calculate Score
## 4. Show the score and branch on it

Now that we have our question ready, let’s add the logic to calculate scores.
Add two endings — a fail card and a pass card. In either card's text, type `@` to recall the score, exactly as you would recall an answer. See [Recall Data](/surveys/general-features/recall).

1. Scroll down in the editor and click on variables.
2. Create a new variable named `score` with a default value of 0
Then add a final rule that routes on the total: **when** `score` is greater than or equal to your pass mark, **then jump to** the pass ending.

![Create Variable named Score image](/images/surveys/best-practices/quiz-time/score.webp)
<Warning>
Order matters. Put the **fail** card above the **pass** card. Endings are reached in order, so anything
that does not match the pass rule falls through to the card above — which is what you want the failing
case to hit.
</Warning>

3. Now go back to the question and expand the advanced settings by clicking on `> Show Advanced Settings`.
4. Under the conditional logic you should see the option to `Add Logic`. Click on that.
## 5. Publish

![Add Logic Button](/images/surveys/best-practices/quiz-time/conditional-logic.webp)
**Publish**, then share the link like any other [link survey](/surveys/link-surveys/quickstart).


5. Now you should see conditional logic. Customize the logic to match your needs for example:

**When** `question` equals `YOUR_ANSWER_HERE` **Then** `Calculate` `score` `Add +` `01`. So it should look something like this.

![When-Then Conditional Logic](/images/surveys/best-practices/quiz-time/when-then.webp)

6. Let's duplicate and customize these questions. Click on the duplicate icon at the top of the question.
7. Now edit the questions, options, and answers in the **conditional logic**

## Creating Multiple Endings Based on Scores

Once you have all the questions and the calculation logic in place, it’s time to customize the endings. Scroll down to the Ending Card section. We will create two cards for this quiz: one for when the user fails the quiz and another for when the user passes.

1. Customize the ending card.
2. Display the score by typing `@score`. ( You can address all the variables or questions by just typing @ ).
3. Add logic to the last question. ( this is necessary to redirect the user based on the score ). Kind of like this:

**When** `score` >= `03` **Then** `Jump to` `Pass`. So it should look something like this.

![Conditional Logic for ending card](/images/surveys/best-practices/quiz-time/ending-logic.webp)

4. Ensure that the Fail card is positioned above the Pass card. This allows any condition that does not meet the criteria of being greater than or equal to 3 to jump to the Fail card.

![Pass or Fail ending Cards](/images/surveys/best-practices/quiz-time/pass-fail.webp)

5. That's it! Now you can save and publish the quiz.

# Wrapping Up

Congratulations! You’ve successfully created a Quiz with Formbricks. You can play around with the quiz that we just created [here](https://app.formbricks.com/s/cm2wwt3vu0001ir8o7ys0bezz).

A great quiz can serve as an excellent lead generator, a job fit checker, or just a fun icebreaker for your team. You now have the skills to build that! If you want to read more about building quizzes and how you can create a Job Fit Quiz check this article [here](https://www.harshbhat.me/blog/formbricks-quiz).
<Tip>
A quiz makes a good lead magnet: add a [contact info](/surveys/question-type/contact-info) question before
the ending and the score arrives attached to an email address.
</Tip>
Loading