Quiz with Instant Results
Online quizzes are a great way to engage your students and test their knowledge on a particular topic. With SurveyJS, you can create multiple online assessment forms, add timing and scoring, customize their appearance, and give personalized feedback to each student once they have completed a test or right after they answered a question. This demo shows how to create an assessment test that displays instant results. Learners can see whether their answer is correct or incorrect immediately after they give it.
Create a Regular Quiz
For your assessment test, you can leverage all available questions types: single- or multiple-choice questions, true/false questions, fill-in-the-blanks questions, and many more. Specify the
Display Results Immediately
To display the response result, you need to validate a question answer against the
correctAnswer property value (see the
isAnswerCorrect function in the code) and show the validation result. Handle the survey's
onValueChanged event to perform these actions immediately after a question value is set. In this demo, "Correct" and "Incorrect" labels indicate correct and incorrect answers. These labels are added to question titles (see the
You should also disallow users to change their answer. Configure a question's
enableIf expression to disable the question after it is answered.
Optionally, you can handle the survey's
onTextMarkdown event to format the correct/incorrect label text with HTML and CSS.