How to code a Quiz in Wix

Someone please help me!!
I am a novice in coding.
I want to implement a QUIZ functionality on my Wix website. The thing is, it’s not a simple Quiz.
It’s a product recommendation.
Let me explain:
It will contain 10 questions.
If the user answers A many times(say more than average) then I need to print let’s say, "Our ‘this’ product is perfect for you "

The same thing goes with the B and C options.
Please help
Thank you
@russian-dima

I would say before you start to code more complicated “QUIZ”, you perhaps should start with more simple structured one. Advantage? → You can improve it more and more, step by step.

And there are surely different ways of how to generate a QUIZ, regarding to which elements you use to generate your quiz.

So your first point on your → “ToDo-List” would be, to make clear thoughts about

  1. How your quiz would look like?
  2. Which elements you want to use to generate your QUIZ?
  3. And how is structured the DB, which is related/connected to your quiz (if you have a connected DB to your quiz at all).

Hi Aayush,
We have a Gift Quiz example and template for Wix Stores that should help you get started. You can check it out here: https://www.wix.com/velo/example/gift-quiz

Hi @russian-dima ,
I designed the front-end now. It is mainly a lightbox which opens on click of a button on the homepage called “Take the quiz”.
Inside the lightbox (called “Know your Dosha”), We have the multi-state box, which contains 11 states, 10 are there for the 10 questions, and the extra will be just a thank you page.


I haven’t set up the database yet as I don’t know what will be the requirements.

After clicking on the options button, the next state should open, with the next question.

Now at the end of the quiz, we need to print three kinds of sentences.
If the maximum answer was option A, we will print " Vata Product ".
If the maximum answer was option B, we will print " Pitta Product "
If the maximum answer was option C, we will print " Kapha Product "

I also invited you to the site.
Thank you

@soniaayush24400
Hello again my friend. First at all thank you for your invitation! But before i start to give you a helping hand, you should first try it on your own.

Did you see the provided example by Marlowe(Wix) ?

What i would suggest you ?

  1. Before you start to programm some code → make sure → you have already a good structured and working database, including all the Questions and answers and what ever else you want to be inside your DB.

  2. After your DB is ready —> you first make some thoughts about how it would work and what would be every single step (coding-step).

  3. About which elements you want to use for your quiz → you already decided to use → a LIGHTBOX + MULTISTATE-BOX → good decision!!! Maybe i would do exactly the same.

And now the provided example, shown by → Marlowe(Wix), comes into place.
I would suggest you first to manage your QUIZ → WITHOUT ← the LIGHTBOX.

After you have a working QUIZ, you still will have the possibility to UPGRADE it by the usage of a LIGHTBOX. This will also afford to expand your code.

Study the given example, because it is very similar or even exactly what you need.

There were already some questions about → How to generate a quiz…
For example this one —>

It’s a very simple one, but could help you, too.

Good luck!

1 Like

@russian-dima Okay, I almost got it working now, thanks.
Please reply on the another ticket I’ve raised about the FAQ.
I want a little help there too.
I’ve tagged you there.

1 Like