Progress Bar help with branch logic | XM Community
Skip to main content

Hi All,

I have a survey with branch logic set up. Initially I have few questions asking demographics question which then sends respondent to one of 6 different blocks to fill different blocks of questions. Each block has different number of questions. As everyone else, I have the problem of the progress bar either jumping to 40-60% at the beginning or going too slowly if the respondent is directed to a block which is in the beginning. I need all the questions part of one survey such that I can then send it out to everyone at once and I can also perform analysis easier. 

I tried the java script code and adding my own values for each question, but anything I do, the value doesnt change. I might be doing something incorrectly as I am not a coder. However, I am inserting the code like below and check in preview if the progress bar indicates what I have set for it to indicate and it doesn’t. 

 

Can anyone please help?

 

 

That looks correct.

Are you using Simple Layout? If so, there are a bunch of caveats to using JavaScript. You can count on nothing you see posted on the Community related to JavaScript or CSS working unless the post is specific to Simply Layout.


@TomG Thanks for letting me know. Which layout would you suggest I switch to see if this works?


I tried with classic and it now works. Thanks. 

Do you may be know why I also don’t see the advanced option under look and feel which I can use to enter java script in the header?


If you are using simple library then you will need to call the JS library first in your survey header first.

copy below library script and paste it under Look and feel » General » Header edit » Source pad (highlighted below) » Save

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

 

Then you can run any JS code in simple layout as well.


Leave a Reply