Auto advance for matrix question | XM Community
Skip to main content

Hi,
for the past 3 years I was using the following JS for simulating an auto advance on matrix questions.

 

Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
var that = this;
var choices = this.getChoices( "radio" ).length;
this.questionclick = function( event, element ){
var selected = that.getSelectedChoices().length;
if ( choices == selected ) {
that.clickNextButton();
}
}

});

This code worked like a charm - but stopped working about 2 months ago!

 

The current behaviour is:

Once all subquestions in the matrix are answered, the next button gets clicked and the next question is displayed. BUT also on the next question, the next button is clicked and this question is basically not displayed.

 

Is anyone aware of any changes made by Qualtrics, which could cause this behaviour?

Or is there a different solution for auto advance on a matrix question?

 

Thanks!

Manfred

Hi,

See this post, your problem has the same cause : 

 


Thanks a lot, ​@vgayraud !

 

In my case, simply replacing the last line of code solved the issue. 

Here’s the code that works:

Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
var that = this;
var choices = this.getChoices( "radio" ).length;
this.questionclick = function( event, element ){
var selected = that.getSelectedChoices().length;
if ( choices == selected ) {
jQuery(".NextButton").click();
}
}

});

 


Leave a Reply