Auto-advance on one block affecting advancement on future block. | XM Community
Skip to main content

The survey I’m developing has two blocks in close proximity to each other. These blocks both have Timing questions.

The Timing question in Block A (the first block) has “Display ‘submit’ after 300 seconds” and “Auto-advance after 600 seconds” enabled. So participants are not able to proceed to the next block before 5 minutes have passed. If they finish after 5 minutes and before 10 minutes, they may proceed to the next block voluntarily. If 10 minutes have passed, the block will auto-advance.

The Timing question in Block B (the second block) has “Display ‘submit’ after 300 seconds”. However, when previewing my survey (and in one case of running my survey), the block auto-advances. Based on timing, I have basically confirmed that Block B is auto-advancing based on the “Auto-advance” feature in Block A. 

I looked online for answers. The only solution that seemed viable was to use 

Qualtrics.SurveyEngine.addOnPageSubmit(function() {
    clearTimeout(to); // Clear the timer to prevent auto-advance
});

or

Qualtrics.SurveyEngine.addOnUnload(function() {
    clearTimeout(to); // Clear the timer to prevent auto-advance
});

on the JavaScript for Block A. However, neither of these codes worked. If anyone has a better solution for preventing the auto-advance timing in Block A from affecting Block B, I would really appreciate it. 

Hi @varunathi ,
Usually this should not happen as the two timer questions should be in different Blocks A and B as you mentioned.

To overcome this, I can suggest one solution that you used one Timer question in Block A and use JS in Block B to Display submit and Auto forward.
You can use the below code, which will act as a Timer
 

/*Place your JavaScript here to run when the page is fully displayed*/
// Hide the NextButton initially
jQuery("#NextButton").hide();

// Schedule to display NextButton after 300 seconds
setTimeout(function() {
    jQuery("#NextButton").show();
}, 300000); // 300 seconds = 300,000 milliseconds

// Schedule to click NextButton after 600 seconds
setTimeout(function() {
    jQuery("#NextButton").click();
}, 600000); // 600 seconds = 600,000 milliseconds
 


 


Leave a Reply