Quizzes
Quiz mode turns any form into a marked one. You give the questions an answer key, LocalForm works out a score for each response, and the person who answered can be shown how they did the moment they submit.
Everything else about the form stays the same: the same builder, the same page, the same responses screen, the same export. A quiz is not a second kind of form - it is a form with an answer key.
Turning it on
Open the form's Settings tab and find the Quiz panel.
- Grade this form as a quiz - switches marking on. An answer key appears under every question that can carry one.
- Pass mark - the percentage needed to pass. Leave it empty to report a score without passing or failing anyone.
- Show the score after submitting - the score, and pass or fail, on the thank-you screen.
- Show which answers were right, and why - a list of every marked question with the answer given, the correct one, and your explanation. Switch it off for a test people may retake.
- Include the score in the confirmation email - so the person keeps a record of their result. Only sent when the confirmation email itself is switched on.
Writing the answer key
Which questions can be marked depends on their type:
| Type | How the key is written | How an answer is judged |
|---|---|---|
| Single choice | Tick the correct option | Correct when the chosen option is ticked. Ticking several accepts any of them. |
| Dropdown | Tick the correct option | As above. |
| Checkboxes | Tick every option that must be selected | Correct only when the selection matches the full set - no partial credit. |
| Text | One accepted answer per line | Compared ignoring capitals and surrounding spaces. |
| Number | One accepted answer per line | Compared as numbers, so 7 and 7.0 are the same answer. |
Every other type - date, rating, phone, email, consent, long text - is asked but never marked. Right and wrong are not properties those answers have, and a score built on guessing at them would not be one you could defend to the person who failed.
On a choice question the key lives on the options themselves: a round tick appears beside each one, and you click the ones that are correct.
Under the options, each markable question also has:
- Points - what a correct answer is worth. Defaults to 1; use 2 for the harder question, or 0 to review a question without letting it move the score.
- Explanation - a sentence shown with that question in the result, when the form shows its answers. This is where a quiz stops being a test and starts being training.
A markable question with no key is asked but not marked. That is how a quiz carries a name field and an email field without them counting for anything.
What the person answering sees
If Show the score is on, the thank-you message is followed by the score - 8 / 10 (80%) - and, when the form has a pass mark, Passed or Not passed.
If Show which answers were right is on, that is followed by every marked question: a tick or a cross, the answer they gave, the correct answer where they got it wrong, and your explanation.
What you see
Responses → Summary gains a Quiz results card at the top: the average, lowest and highest score, how many passed, and a table of every marked question with how many people got it right. Questions under 50% are highlighted - that table is the reason to run a quiz rather than a survey, and the question everybody missed is usually the one worth rewriting.
Responses → Individual gains a Score column, with a pass or fail badge beside it.
Every export of a marked quiz gains Score, Total points and Percentage columns, plus Result when the form has a pass mark. They go out as numbers, not text, so a spreadsheet can average or sort them. The Excel, with a summary sheet export also carries the whole quiz summary - group scores and per-question results - on its Summary sheet.
The Print link beside a response prints the score under the answers, which is what makes a printed response usable as a training record.
Scores are worked out, not stored
A submission holds the answers and nothing else. The score is worked out from those answers and the form's current answer key every time it is read - on the responses screen, in an export, in an email.
Three things follow from that, and they are all deliberate:
- Correcting a key re-marks the responses you already have. Get an answer wrong in the key, fix it, and everyone who was marked against it is re-marked - no re-import, no stale scores in the export.
- Switching quiz mode on marks what came before it. A survey you have been running for a year can be given an answer key today, and its whole history is scored.
- Switching quiz mode off keeps the key. Nothing is graded while it is off, and turning it back on picks up exactly where it left off.
The flip side is worth saying plainly: a score is only ever as current as the key. If you need a result frozen at the moment it was taken - a compliance record that must not move when someone edits the form - export it, or print the response, at the time.
Building a quiz with an AI assistant
The MCP abilities understand the answer key, so an assistant can write the whole quiz for you:
Build a fire-safety quiz on my site: six multiple-choice questions, two points each, 70% to pass, with a one-line explanation on every question.
The form arrives with its questions, its answer key, its points and its pass mark, ready to review in the builder. quiz_answers, quiz_points and quiz_feedback are per-question; quiz.enabled, quiz.pass_mark and the three display switches are per-form.
Starting from the template
LocalForm → Add New offers a Quiz starter: a short knowledge check with a single-choice question, a checkbox question worth two points, a numeric answer and a 70% pass mark, with quiz mode already on. Everything in it is editable, and nothing is saved until you press Save.
Developers
localform_quiz_resultfilters a graded submission before anything is shown, exported or sent - the place for partial credit, a weighted section, or a pass decided on something other than the percentage.localform_quiz_gradable_typesfilters which question types can carry an answer key.- A webhook payload from a marked quiz carries a
quizobject (earned,total,percent,correct,graded,pass_mark,passed), so an automation can route a failed attempt to whoever follows those up.
The answer key never reaches the browser before a submission. It lives in the form's field definitions, which only the admin screens and the authenticated REST and MCP endpoints read - the rendered form prints labels, options and validation attributes, and none of the quiz_* keys.