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

Allow users to go back only one page?

  • Jan 17, 2020 4:06 PM UTC
  • 7 replies
  • 162 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 ●
  • Jan 18, 2020 6:59 PM UTC
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
  • Jan 21, 2020 3:39 PM UTC
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 2 ●●
  • Jan 22, 2020 4:10 PM UTC
FYI, @TomG offers some custom code for purchase that does this and works well.

  • Author
  • Jan 22, 2020 4:18 PM UTC
@TomG could i get more info on this??

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

Forum|alt.badge.img+2
  • May 24, 2022 12:52 PM UTC

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

Thanks!


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • May 25, 2022 2:56 PM UTC

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