Repository navigation
Quiz and survey tags
Written against v0.5.3.
The quiz and survey tags show a scored submission. They read the submission from the confirmation message or the notification email they run in, and they render nothing outside a submission or for a form without quiz or Likert scale fields.
The tags are available while quiz_scoring is on. While quiz_tags_in_user_content is also on, the add-on adds them to Statamic's antlers.allowedContentTags so they resolve in a message (see Configuration).
| Tag | Result |
|---|---|
{{ quiz }} |
Every quiz question with the answers given, the correct answers and the explanation. |
{{ quiz handle="q1" }} |
One question's breakdown. |
{{ quiz:score }} |
The total score. |
{{ quiz:score handle="q1" }} |
One question's score. |
{{ quiz:percent }} |
The percentage score as a bare number, such as 85. Add the % in the message. |
{{ quiz:grade }} |
The letter grade. Empty when the form defines no letter grades. |
{{ quiz:passfail }} |
Passed or Failed. Empty when the form defines no passing percentage. |
Grading is set in the form's Quiz Settings section: see Score a quiz.
| Tag | Result |
|---|---|
{{ survey }} |
Every Likert scale question with the answer given. |
{{ survey handle="q1" }} |
One question's answer. |
{{ survey:score }} |
The total score. |
{{ survey:score handle="q1" }} |
One question's score. |
See Score a survey.
Antlers resolves a variable before a tag, so a submitted field whose handle is quiz hides the bare {{ quiz }} tag, and a field named survey hides {{ survey }}. Use the : forms ({{ quiz:score }}) or handle="...", or give the field another handle.
Home | Getting started | Guides | Troubleshooting | Reference | README | Repository
Written against v0.5.3. Edit these pages in docs/wiki/ through a pull request; edits made in the wiki are overwritten by the next publish.
Getting started
Guides
- Send notifications
- Choose what visitors see after submitting
- Close a form on a date
- Score a quiz
- Score a survey
- Save submission data
- Turn a feature off
Troubleshooting
Reference
- Configuration
- Form settings screen
- Restriction states
- Conditional logic
- Merge tags
- Quiz and survey tags
- Fieldtypes
- Extending the add-on
- README
Project