Disabling "Next" doesn't work when there's a Timing question in the same page. | XM Community
Solved

Disabling "Next" doesn't work when there's a Timing question in the same page.

  • 23 July 2021
  • 5 replies
  • 81 views

Badge +2

Hey,
I'm trying to disable the "Next" button for one of the questions in my survey, so that I can later re-enable it once a condition is met.
This usually does the job:
Qualtrics.SurveyEngine.addOnload(function()
{
this.disableNextButton();
});
Unfortunately, when a timing question is included in the same page (i.e. no page break between the question and the timing question). Disabling the next button doesn't work. However, the timing question must be in the same page in order to time and count the clicks for the regular question ...
I also tried:

  • Using jQuery to disable the button, i.e. jQuery('#NextButton').attr('disabled', true)

  • Adding the disable code to the Javascript of the Timing question.

but to no avail ...

Any help would be appreciated.
Thanks!

icon

Best answer by rondev 23 July 2021, 17:55

View original

5 replies

Badge +2

FWIW I tried it in a new question in a different block and it did work.
While it still didn't work in a new question in original block.
So it seems to be related to some setting applied at the block level - but not sure what exactly.



Badge +2

Seems this is related to having a timing question in the same page.
I updated the question accordingly.

Userlevel 7
Badge +22

You can disable (hide) the next button using same timing question by adding a max limit on the "show next button after" option. OR Use this code to disable the next button:
var that = this; setTimeout(function(){ that.disableNextButton(); }, 1000);

Badge +2

Thanks for the workaround, rondev!

Userlevel 3
Badge +5

rondev Hi, rondev. Could you please specify whether should I put the code you provided? I have tried the three parts of the javascript of the timing question, but none of them worked...

Leave a Reply