The Idea
The yoga craze is here to stay, and if you haven’t sun salutationed your way in to a yoga class by now your friends have probably left you in the dust. Maybe all of the bending and stretching looks to you like the purest form of torture, or maybe you’ve always wanted to try a class but didn’t know where to start. Maybe you just thought, “I wouldn’t be good at that.” This is nonsense! Yoga is for everyone. Yoga has countless benefits for mental and physical health, and it meets you where you are.
So where are you? What’s your yoga personality? This quiz will take user input by asking some questions in a form about their personality, needs and wants. Based on the unique features and sensibilities of each type of yoga, the form will return a suggestion for the type of yoga that will be best for them, and then rank every other type in the order that suits them best.
The Algorithm
The form will use radio input for each question, where the user is given choices and must choose one. The value for each answer will correspond with the appropriate yoga style. In order to score the quiz and place the person in the appropriate yoga category, the script will get the value of each answer when the user hits submit. The score/ result will come from the user answers via “if then” statements, eg. if they chose A, then points will be given to the corresponding yoga style. Some answers may relate to more than one yoga style, and in that case both styles will be given weight via the value attribute. The result will show up at the end of the quiz after the user has submitted. The ranking of each answer will describe why that yoga style is good for that person.
Sit back, relax and let this quiz guide you on your yoga journey. Try the final quiz here!