How to unhide next button? | XM Community
Solved

How to unhide next button?

  • 19 August 2019
  • 7 replies
  • 435 views

Badge
I hid the next button on a number of questions in a block using the javascript line $('NextButton').hide();
On the last page of the block, I want the button to show, so participants can move on to the next block. I didn't add any javascript to that last question. For some reason, the button doesn't show. (If I add an additional question after that, the button doesn't show either.) Does anyone understand what could be the problem or what javascript I could use to show the button? Or any alternative to move on to the next block? I don't want to use a timer because that would require a page break where I don't want one.

Thanks in advance!
icon

Best answer by JeremyK 28 August 2019, 17:31

View original

7 replies

Userlevel 7
Badge +27
It sounds like the last question in your block is on the same page as a question with the JS that hides the next button. Either remove the JS from any other question on the same page, or move the last question to a different page.
Badge
Thanks for the tip, unfortunately that didn't solve it. I added a page break before the last question, but then couldn't advance to the next page. I also tried to put the last question on a new page using display logic, and again couldn't advance to the last question.

Let me elaborate. I hid the next button on a number of questions in the same block (except the first few and the last one) because I want the next question to always show automatically when participants give an answer. I'm using display logic to have the next question appear when a response is given. In the display logic, I checked "in page" to have the next question appear on the same page. When I either add a page break or uncheck "in page" in the display logic, the display logic doesn't seem to work and I can't advance to the last question.
Userlevel 5
Badge +7
TomG's still got the right idea. The way you've got your survey configured, I don't believe you'll ever see the Next button. You've got this group of questions all on the same page and you're hiding the Next button, using In Page Display Logic to 'advance' the survey, but are you using logic anywhere to show the Next button again? Check out Qualtrics' question API documentation. One of the options is .showNextButton(), which could be useful to you if you need to show the next button in your survey. If you don't want to show the button altogether, you could implement a solution using .clickNextButton() that would automatically advance your respondents to the next question after a certain action.
Badge
Thanks! I tried using logic to show the Next button again, but that made the button visible for all questions, including the ones where the button should be hidden. I'll try using .clickNextButton() next time. That sounds like it should do the trick!
Badge +1

I have a similar question. I've hidden the Next button on a page using the javascript: $('NextButton').hide();
I want the Next button to appear only when the user clicks on a different button that I've created. That button displays text information when clicked. Here's my script, when runs when the page is fully displayed:
JS:
jQuery("#button1").click(function() {
jQuery("#infodiv1").toggle();
});
HTML:


What additional code do I need to add to make the Next button appear when they click button1?
Thank you!

Userlevel 5
Badge +7

unipsychologist I believe you just need to add a question API call in your JS. When the user clicks your Button1 and the JavaScript fires, you want to include the method
this.showNextButton ()
Right after your .toggle() command.

Source: https://api.qualtrics.com/api-reference/ZG9jOjIwMTY2NzUy-javascript-question-api

Badge +1

https://community.qualtrics.com/XMcommunity/discussion/comment/42703#Comment_42703Thank you! I eventually got it working with this command:   $('NextButton').toggle();

Leave a Reply