Hide next button until text is pressed | XM Community
Solved

Hide next button until text is pressed

  • 18 December 2018
  • 2 replies
  • 2 views

Badge
Hi,

I would like to hide the next button until participants click on a line of text above the question as this will update the table. Once they press "click here to see the monetary rewards" I would like the next button to show again (shown in the picture below).

I have used the code $('NextButton').hide() to hide the next button which works but I am unsure how to make it appear again.

!


Any help you can offer would be greatly appreciated!
icon

Best answer by Anonymous 18 December 2018, 18:45

View original

2 replies

Hello @ChloeM ,

You can assign the id to span with text "Click here to see monetary rewards" in "Rich content editor" -> "<>" source of question. Using id of this span we can toggle the next button using on click event.

I would believe:
this.showNextButton();
should be the command you are looking for.
BUT:
This will not work within certain function scopes, you might start the "Qualtrics.SurveyEngine.addOnReady" section with:
that = this;
and use
that.showNextButton();
where it is needed... That was the only way it worked for me.
I agree that this needs better documentation, the first search hits lead to unworkable solutions...

Leave a Reply