How to use a quiz score merge code with javascript



I am trying to add a javascript action to my survey and I have some logic in it that requires knowing the tally score of my survey. I thought I could use the “[quiz(“score”)]” merge code but it doesn’t translate an integer, instead it just brings the string “[[QuizScore]]”.

Is there a different method I could use? I read a bit about hidden values but those seem to require a page after the quiz score page, which is not allowed.

Thank you for your help

Pierre Mitchell answered

     Problem solved, Thank you.


    Solution: put the quiz score on an earlier page and use a basic merge code [question(“value”),id=”2″] to call the tally result followed by ‘pts’

    Then, in Javascript use parseInt which automatically disregards the ‘pts’ and only uses the score.¬†

    Pierre Mitchell answered

      I’m not sure if you have taken a look at this help article but it could be a good place to start:

      I also think the Hidden Value option could be a good route. While Quiz Score actions are typically added to the last page of a survey, you could move your Quiz Score to an earlier page on your survey and then have hidden values on a page after the Quiz Score action.

      Hope this helps!

      Pierre Mitchell commented


        Question stats

        • Active
        • Views1574 times
        • Answers2 answers
        • Followers1 follower