Allow users to go back only one page? | XM Community
Skip to main content

Allow users to go back only one page?

  • January 17, 2020
  • 7 replies
  • 139 views

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!

7 replies

Yash
Level 1 ●
Forum|alt.badge.img+3
  • Level 1 ●
  • January 18, 2020
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>

  • Author
  • January 21, 2020
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.

Forum|alt.badge.img+5
  • Level 3 ●●●
  • January 22, 2020
FYI, @TomG offers some custom code for purchase that does this and works well.

  • Author
  • January 22, 2020
@TomG could i get more info on this??

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • January 22, 2020
> @tah77 said: > @TomG could i get more info on this?? I responded by private message

Forum|alt.badge.img+2
  • May 24, 2022

Hey TomG
could you provide me the custom code? :)

Thanks!


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • May 25, 2022

https://community.qualtrics.com/XMcommunity/discussion/comment/46490#Comment_46490Send me a private message if you are interested in purchase.