Hello!
I am trying to figure out a way to allow users to go back only one page rather than being able to click back through all of them.
For example, if the user reaches page 4, they can only go back to page 3. So once they go back to page 3, the back button for that page should be hidden or disabled.
I am somewhat new to javascript so I'm not sure what my options are. Let me know if you have any ideas!
Page 1 / 1
Hi,
Could you please try this code by adding to your next question where you want to display the previous button, please let me know if this helps.
<samp>
jQuery(this.getQuestionTextContainer()).append('<button id = "PrevButton">Go Previous</button>');
var that = this;
function GoPrev() {
that.clickPreviousButton();}
document.getElementById("PrevButton").addEventListener("click", GoPrev);
<br/><br/>
</samp>
Could you please try this code by adding to your next question where you want to display the previous button, please let me know if this helps.
<samp>
jQuery(this.getQuestionTextContainer()).append('<button id = "PrevButton">Go Previous</button>');
var that = this;
function GoPrev() {
that.clickPreviousButton();}
document.getElementById("PrevButton").addEventListener("click", GoPrev);
<br/><br/>
</samp>
thank you! this somewhat answers my question.
but how could i hide this after the user leaves the page? for example, there will be a back button on page 3 when they get there after question 2. then once they reach page 4, they can go back to page 3, but the back button on page 3 should be hidden.
but how could i hide this after the user leaves the page? for example, there will be a back button on page 3 when they get there after question 2. then once they reach page 4, they can go back to page 3, but the back button on page 3 should be hidden.
FYI, @TomG offers some custom code for purchase that does this and works well.
@TomG could i get more info on this??
Hey TomG
could you provide me the custom code?
Thanks!
https://community.qualtrics.com/XMcommunity/discussion/comment/46490#Comment_46490Send me a private message if you are interested in purchase.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.