Quiz with Letters for Answer Values

karae 03 Jun, 2019
I'm looking to create a quiz with radio buttons that has letters assigned to the answer values and at the end of the quiz the result would be something like "you answered mostly A's..." or "mostly C's". Most of the quiz examples I've seen have only has right/wrong answers.

Is this possible in Chronoforms?

Thanks
healyhatman 03 Jun, 2019
Answer
Yes it is, easily.

1. Set up your quiz options
2. Name your quiz fields quiz[xxxx] replacing xxx with whatever you want (as long as it's unique. A number is fine)
3. On submit, use PHP to loop through $this->data("quiz") and count how many of each there are and return whatever you need to return, like a "you answered blahblah" string
4. Use {var:phpblockname} to show the returned value wherever you want it.
karae 07 Jun, 2019
Awesome - thank you!
This topic is locked and no more replies can be posted.