hiding the "next" button until a text response is made | XM Community
Solved

hiding the "next" button until a text response is made

  • 15 October 2018
  • 3 replies
  • 34 views

Hello! I am trying to display a text entry question (only question on the page) for a maximum of 30 seconds. If a response is not entered within 30 seconds, the question will automatically advance. If a response is entered, I would like the next button to appear so that the user does not need to wait until the 30 seconds are up before going to the next page.

I was able to use JavaScript to hide the next button (thanks to a different discussion thread); however, I have not been able to figure out how to make the next button appear in response to a key press (i.e., when the user types something in response to the text entry question on the page).

Many thanks in advance for the help.
icon

Best answer by Anonymous 15 October 2018, 08:49

View original

3 replies

Userlevel 7
Badge +33
Go through below post
https://www.qualtrics.com/community/discussion/249/how-can-i-hide-the-previous-and-next-buttons-on-my-survey
Hello @JenniferS ,

Paste the following code in the js(onLoad) of the text entry question

var that=this.questionId;
jQuery("#NextButton").hide();
jQuery("[id='QR~"+that+"']").keyup(function(){
if(jQuery(this).val() != ''){
jQuery("#NextButton").show();
}else{
jQuery("#NextButton").hide();
}

});

The above code will check the user has input the text and accordingly show or hide the next button. For auto-advance, add timer question on the same page with following settings(see image)
!
Thank you @Shashi, that code is working! I greatly appreciate the help.

Leave a Reply