Simple Layout JavaScript to Autoadvance on a single question (NPS) | XM Community
Skip to main content

We are launching a web intercept on our checkout page and want as few clicks as possible for clients to complete our survey.

I’m looking for help with the JavaScript that would be needed for Simple layout to hide the next button on our NPS question and auto advance to our next question/page once a response has been selected. 

 

The remaining questions in our survey are matrix and open text, so I only want to add autoadvance to this single question rather than the whole survey.

@Mcasenhiser

You can enable the auto advance from look and feel and it would only work for the NPS and not other question types you have mentioned.

But if you do not want to enable auto advance and to hide NextButton on one page in simple layout , try using below code.

Qualtrics.SurveyEngine.addOnReady(function() {
// Hide the Next button when the survey is ready
jQuery('#next-button').hide();


var qid = this.questionId;

jQuery('#question-' + qid).click(function() {

jQuery('#next-button').click();
});
});

Qualtrics.SurveyEngine.addOnPageSubmit(function() {
// Show the Next button when the page is submitted
jQuery('#next-button').show();
});

 


Leave a Reply