Setting for "Next Page" button | XM Community
Skip to main content
Solved

Setting for "Next Page" button

  • February 17, 2024
  • 2 replies
  • 95 views

Forum|alt.badge.img+2

Hi community,

My survey consists of one multiple choice question. Each choice represent one quota, and the choice would disappear if someone else has already selected that choice, so in the end it might be no choice left if all the choices are selected.

Now I am trying to let the “next page” button be disabled if none of the options could be selected. How can I do with that?  Thanks! :)

 

Here attached an image for your reference. It is clear that no choices can be selected now, but respondent is still able to select next page and finish the survey.

 

Best answer by TomG

I don’t think disabling the next button is the best way to handle it, but JS would do it:

Qualtrics.SurveyEngine.addOnload(function(){
if(jQuery("#"+this.questionId+" [choiceid]").length==0) this.disableNextButton();
});

A better way to handle it would be to use a survey flow branch prior to the question that checks if all the quotas are met, and if they are screen out the response.

2 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6083 replies
  • Answer
  • February 17, 2024

I don’t think disabling the next button is the best way to handle it, but JS would do it:

Qualtrics.SurveyEngine.addOnload(function(){
if(jQuery("#"+this.questionId+" [choiceid]").length==0) this.disableNextButton();
});

A better way to handle it would be to use a survey flow branch prior to the question that checks if all the quotas are met, and if they are screen out the response.


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • 12 replies
  • February 20, 2024

Thank you so much @TomG !!

I successfully handled it by your instructions, really appreciate your help. I love the community here:)