Table of Contents

Build a Quiz App

Danielle Kellogg Updated by Danielle Kellogg

This article walks you through using Knack to create a Quiz app.

The main feature is using the form's Submit Rules to direct each form submission to a child page. You can then show "answer" fields in a details view for the question that was just asked.

You can see the example quiz here.

Define a Quiz Object

1. Add a Quizzes object and change the first field to a Date field:

2. Add a Multiple Choice field for the first question. Check the box for Required, add options for each possible answer, and choose the "Radio Buttons" Layout:

3. Add a Number field to record the score. Use Conditional Rules to set the score's value based on the value of Question 1:

  • When Question #1 is the correct answer, set the field to a custom value of 1.
  • For every other record, set the field to a custom value of 0.

4. Add a similar Multiple Choice field to display the result based on the score:

5. Add the same 3 field types for any additional questions you'll want on your quiz.

6. After all your question fields are added we'll need some fields for the final score and result. Add an Equation field to add up the question scores for all questions:

7. Add a Text Formula field to display the score in a sentence:

8. Finally, add a Paragraph Text field and use Conditional Rules to set some text we can show the user based on their total score:

Add a Question & Answer Page

1. Click on the Pages section of the Builder and add a Question 1 page with a form adding a new Quiz:

2. Edit the form to only show the Question #1 input and replace the label with the full question:

3. Add a Submit Rule to redirect the form to a new child page called "Answer #1" where we can display the answer in a details view:

4. Edit the details view to show the "Q1 Result" field in a big header:

We can also add a RichText view to further summarize the correct answer.

5. Add a Menu view to the “Answer #1” page to add a link to a new page. Select the form option, name the page “Question 2” and then rename the menu button to “Next Question”:

6. Repeat the steps above for any further questions. Each question should be in one form, and that form should redirect to a child page that displays the answer.

Add a Results page

1. On the final answer page we'll add a Menu view for a "Final Results" page. Edit the details view to show the total score and final result text we set up with conditional rules:

And that's the basics of a Quiz app!

How did we do?

Build an Inventory Manager App

Build a Warehouse Manager App

Contact