How Results Are Calculated

closed

We have a four question personality quiz and if choices are split evenly between two options, only one result is shown, resulting in two related questions from us:
1. How is a result chosen with an even split of answers?
2. Can an even split show both results?

January 20, 2026 at 6:30pmJeff

In the case of a tie, whatever result is first (in the order you added them in the backend) will be the one chosen.

If you wanted to show all of the results that tied for the highest score, you’d unfortunately need to make some changes to the plugin JS script for personality quizzes.

If you edit hd-quiz/assets/frontend/hdq_personality_script.js there are two things to note in the submit function.

The first is that I create a variable object called results. This stores the outcome ID and score of each possible outcome.

The second is that in the section where I select the outcome to display, I am checking a variable called score to make sure it has a value, if (score != 0) { and then displaying the relevant outcome.

It is inside of here that you’d want to update the logic. What you’ll want to do is:

A) Iterate through the results object to find whatever has the highest score.
B) loop through again to figure out which outcomes have the same value as the highest score and store that info.
C) now you know which outcomes to show, so select and display.

Just note that you’d have to patch in this change every time you update HD Quiz.

20 January 2026 — 15:24support admin Dylan

Respond to thread

This thread has been closed / marked as resolved.
You can reply to this thread, but it might be better to start a new thread if you need help
.

Submit