Build a quiz with multiple scores
Typeform’s score feature makes it simple to do jobs like tracking quiz takers’ performance or segmenting leads into groups. You can even show form respondents different Endings based on their total score. But what if you’d like to use more than just one score, and create different totals for different parts of your form?
This guide covers how you can use multiple variables to score different sections of a form. We’ll create Number variables, then use Logic to change variable totals and show different Endings based on those totals.
1. First, set up a form with different sections, each of which should be scored individually. There are a million possible forms you could create: satisfaction surveys with scores for different areas, order forms with totals for different product categories, personality quizzes with scores for different traits...
For this example, we’ll create a geography quiz about world capitals, with a different section for each continent. There are 3 sections, and each section has 5 questions.
Use Question Groups to keep sets of questions together:
2. Next, add a variable for each set of questions. Open the Logic tab on the right-hand side of the Create panel, click Personalize with data then Variables.
Click + Add custom variable to add new variables to the form.
Add a new Number variable for each set of questions in your form. Here, we’ve added three variables: europe, africa, and americas, keeping the starting value of each variable at 0.
Click Save once you’re finished.
3. Now, add Logic so that the variable’s value increases by 1 when the respondent gives the correct answer to the question, and stays at its current value when the respondent gives an incorrect answer. Open Branching and calculations from the Logic tab.
Add logical rules to each quiz question that change the variable’s value according to the answer. In this case, 1 point should be added to the variable europe when the respondent correctly answers Madrid for the question What is the capital of Spain?.
Here’s what that Logic looks like for a Multiple Choice question.
And here’s what it looks like for an open-ended, or Short Text, question.
Feel free to use whatever grading scheme you like: subtracting points only for wrong answers, giving partial credit for partially correct answers, etc. If you’d like to show your respondents the correct answer after each question, check out this guide.
4. Add similar logical rules to the rest of the quiz questions. Remember to use the right variable for each question set: logical rules for questions about African capitals should refer to the africa variable, and so on.
Click Save when you’re finished.
5. Time to work on Endings, which show respondents how they did on the quiz overall. You can create multiple Endings to show different messages to different groups of respondents.
Since this is a graded quiz, we’ll show one Ending to respondents who passed the quiz, and a second Ending to respondents who didn’t pass. Here, we’ll define “passing” as “getting at least 3 questions right in each set of questions.” In other words, at the end of the quiz, respondents need each variable to have at least 3 points in order to pass.
Add Endings by clicking the + sign next to the Endings section in the Create panel.
Then, write your Ending text and customize Ending settings.
Here’s how an Ending might look for respondents who passed the quiz.
This Ending uses Recall information to show the value of each variable at the end of the quiz. That way, respondents can see how they did for each continent. To show variable values, just hit the @ key while typing in any form question, and choose the item you want from the list:
We’ve also deactivated the button that shows on the Ending screen:
On the other hand, here’s how an Ending might look for respondents who didn’t pass the quiz:
Recall information is used once more to show variable values. If you’re on a Plus plan or above, you can also change the button text and link to redirect quiz takers to a page where they can review their geography:
6. Finally, open Branching and calculations again. We’ll use Logic to direct respondents to the right Ending after they finish the quiz.
In this case, respondents will only see the Ending that tells them they’ve passed if, by the end of the quiz, all of the variables have at least 3 points.
To set this rule, click + Add rule after your last question.
Add a condition that says that the score for europe must be greater than 2:
Click + Add condition.
Add two more conditions that say that the scores for africa and americas, respectively, must be greater than 2. Here’s how the three conditions will look together:
Now, fill in the Then term, so that respondents who meet all the conditions you set will see the Ending screen that tells them they passed. In all other cases (that is, if respondents finish with fewer than 3 points for any variable), respondents will see the Ending that tells them they didn’t pass.
7. You’re done! Turn your changes live by clicking Publish.
Below, you can try out the quiz we built in this guide:
We hope that this walkthrough has given you fresh inspiration for getting the most out of your forms. Have a cool form that uses multiple variables to calculate scores? We’d love to hear about it in our Community!