In page score calculating | XM Community
Skip to main content

Hello, It is a beginner question that I could not find an answer to.
I have scores for each participant and they are allowed to allocate earned scores on different gifts. Each gift has a different price. I have menu page where I ask the participant to choose the amount of each gift they want. It is like an online shopping page where you have to spend the exact amount you have. I want to disable the next button until the score is equal to 0. So all the earned score is distributed to the gifts. I already defined score for each question. Let's say gift X costs 5 points. Then, if the participant choose 1 of gift X, then score is -5 of old score. But of course the score is not updated until the page is left. Hence, I need to find a way to deduce from the score in-the-page with javascript.
I managed to do it by asking for the amount demanded of each gift in a different screen. Between screens, I updated the score. Hence, it goes until the score is equal to 0. However, it is not desired. The optimal solution would be to do it in one screen.
Any help will be appreciated.

Be the first to reply!

Leave a Reply