Solved
Progress Bar Customization
Have anyone used some customised codes for progress bar showing the total progress on survey, currently the progress is based on the pages of the survey responded... if one my question has the logic the % is not acccurate.
Best answer by KimothiSaurabh
@ChhaviChauhan - If there are few questions in block you can exclude those from calculation of progress bar as mentioned in below link:-
https://www.qualtrics.com/support/survey-platform/survey-module/survey-flow/standard-elements/branch-logic/#ExcludefromProgressBar
If this don't help and you have idea of approximate how many questions are being asked to a respondent you can put below code in survey header:
jQuery("div.ProgressBarFill").css("width", ${e://Field/progrs}+"%");
Qualtrics.SurveyEngine.addOnPageSubmit(function(type)
{
if(type == "next")
{
var n = 3;
var increment = 100/n;
var old_val = Number(${e://Field/progrs});
var new_val = old_val + increment;
Qualtrics.SurveyEngine.setEmbeddedData('progrs', new_val);
}
});
For this you will have to create an embedded variable in starting of survey flow with default value as 0. I am assuming every respondent will see around 3 questions in link no matter how many questions are created there is survey.
If number of questions vary drastically from respondent to respondent as per flow, you can set value of 'n' as biggest possible value and then change value of embedded data somewhere in last questions. Please note that this code will show progress bar as per value in embedded data, so you can change value of it and play with progress bar.
View originalLeave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.