Auto advance and force response with mcq not working | XM Community
Skip to main content

Hi,

I have 5 MCQ questions in a block , all separated by a page break. Each question has 3 options.  I want to add  timer  for 45 seconds for each question and auto-advance to the next question when the time is up.  Each question is mandatory (force response) but if they don’t answer the question within 45 seconds, I want them to be moved to the next question. 

I also want the questions to stay in the same block as I am scoring the questions in a block. I tried some codes on XM community which had Java Script code but did not work.


Any help would be greatly appreciated. 

Hi @supadhyay 

you van use this code for it:

Qualtrics.SurveyEngine.addOnload(function() {

    var that = this;

    setTimeout(function(){

        that.clickNextButton();

    }, 45000); // 45000 milliseconds = 45 seconds

});

 

Write this code in each question you wanne have the advance. 


@supadhyay,

Force response and auto advancing after a fixed time are incompatible.

If you really need force response, one solution would be to add a 4th choice (e.g., timed out) to your questions, then use JavaScript to hide the 4th choice, keep track of the time and select the 4th choice and click the next button if it times out.


Thanks for the suggestion. Do you have a working code for this? 
 

 


Hi @supadhyay 

you van use this code for it:

Qualtrics.SurveyEngine.addOnload(function() {     var that = this;     setTimeout(function(){         that.clickNextButton();     }, 45000); // 45000 milliseconds = 45 seconds });
 

Write this code in each question you wanne have the advance. 

I tried using this, same issue, it restarts the timer again.  Each question is mandatory (force response) but if they don’t answer the question within 45 seconds, I want them to be moved to the next question. 
Since this is mandatory maybe it will not  move to the next. Any idea on how to fix it?


@supadhyay,

Force response and auto advancing after a fixed time are incompatible.

If you really need force response, one solution would be to add a 4th choice (e.g., timed out) to your questions, then use JavaScript to hide the 4th choice, keep track of the time and select the 4th choice and click the next button if it times out.

 

Hi, Tom, can you help me with this code? Thanks, greatly appreciate this.

This is how my question looks like. Each question is mandatory (force response) but if they don’t answer the question within 45 seconds, I want them to be moved to the next question. There are 5 questions in each block separated by page breaker.

 


Leave a Reply