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.
How do I disable the next button until the last carousel question is answered?
Best answer by ArunDubey
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*/
});
Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
