Hide "Next Button" for 30 seconds and display it after time passes. | XM Community
Solved

Hide "Next Button" for 30 seconds and display it after time passes.

  • 5 October 2019
  • 5 replies
  • 1021 views

Badge +1
Hi,

I'm now trying to hide the next button on the survey page (HTML is embedded) for 30 seconds, and then display the button after the time passes. This will ensure participants read the HTML at least 30 seconds and they can manually advance the next page when they finish reading the material.

I have checked some similar questions in this community, but I had no luck to find the answers that I want to get. Also, the [Enable Submit After] function didn't work for my study because I can still see the next button on the survey page.

Could you give me some advice to resolve this issue?
icon

Best answer by TomG 5 October 2019, 23:37

View original

5 replies

Userlevel 7
Badge +27
Try:
```
Qualtrics.SurveyEngine.addOnReady(function() {
this.hideNextButton();
setTimeout(function() { jQuery("#NextButton").show(); },30000);
});
```
Badge +1
Hi TomG,

Thanks for the reply. Unfortunately, I can still see the Next Button on the page 😞 Could you give me another advice? Thank you!

Best,
Ashley
Userlevel 7
Badge +27
> @AshleyLee said:
> Hi TomG,
>
> Thanks for the reply. Unfortunately, I can still see the Next Button on the page 😞 Could you give me another advice? Thank you!
>
> Best,
> Ashley

Do you see it temporarily (it flashes and disappears) or all the time? Did you put it in the addOnReady function as instructed and not the addOnload function?
Badge +1
The Next button is displayed all the time (not flashed), and yes, I put the javascript to the addOnReady function, not the addOnload function. I embedded iFrame (to add HTML) to the survey page. Does it make problems in hiding the Next button?
Badge +1
Hi TomG,

I figured it out! Instead of "this.hideNextButton();", I had "$('NextButton').hide();" and now I can see the next button disappeared for 30 sec and appear after then. Thanks for your advice!


<Correct script>

Qualtrics.SurveyEngine.addOnReady(function() {
$('NextButton').hide();
setTimeout(function() { jQuery("#NextButton").show(); },30000);
});

Leave a Reply