I was looking for Java script to hide the next button untill last answer provided in a multiselect Carousel and Carousel card options are caaryforwarded from last multiselect Question (maximum 9 and minimum 1).
Request you to please help to share JS code for this requirement.
Thank you so much for your help in advance.
Page 1 / 1
Hi
I’m understanding it correctly, you want to hide forward button till last card of carousel. Please refer below solution and js code and let me know if it works for you.
So Q1 is multi select:
and Q2 is carousel grid question:
Paste below jQuery code on Q2: Replace QID1 with Q1 id of your survey.
Try this and let me know if it’s working.
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
setTimeout(function(){
var Q1x='${q://QID1/SelectedChoicesRecode}';
var count=Q1x.split(',').length;
if(count>1 && jQuery(".CarouselCard").last().hasClass("NoDisplay")){
jQuery("#NextButton").hide();
}
},30);
});
Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
jQuery(".CarouselCardRightContainer").click(function(){
if(!jQuery(".CarouselCard").last().hasClass("NoDisplay")){
jQuery("#NextButton").show();
}
});
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/
});
great, good luck
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.