Community Groups are officially here!
We've released Groups, a new feature that enables us to connect community members of similar industries and interests in a shared, private space. You can check out all of the details here, including information about who can join, how to join, and what Groups are currently offered. Please leave your feedback through this Community Groups Feedback Survey.

Hide next button until text is pressed

ChloeM
ChloeM Belfast, Northern IrelandCommunity Member, Qualtrics Brand Admin Qubie ✭
edited December 2018 in Custom Code

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!

Best Answer

  • [Deleted User]
    [Deleted User] Qubie ✭
    Accepted Answer

    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.

Answers

  • jkPlymouth
    jkPlymouth United KingdomCommunity Member Qubie ✭

    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...