Page data and positioning remaining when clicking Back in browser

Hi all,

My app is a jobs site. The jobs are displayed on a repeating group on the homepage with pagination. These jobs are filtered with several input fields. When a user clicks on a job, it opens in the same tab. I would like it so that when the user clicks Back in the browser (or even clicks back through a button I add) that they will land at the same position that they left in the Repeating Group and with all the input fields still containing the same values. Is this possible? The majority of users would not be logged in.

Any advice would be much appreciated.

Thanks


When page is loaded scroll to position: x, go to page: x.
To get the page of repeating group, use a state.
+1 to the state every time the next page is clicked (but not last page)
-1 for when previous page is clicked. (but not first page)

But theres a better method, if you stay on the same page


fdkljsfs | Bubble Editor ,

1 Like

Thanks so much :pray: Will give this a go

Hi again :wave:

I’ve played around with your suggestion here and so far have got most of it to work. I’ve got a couple of questions on your first suggestion though.

  1. Is the scrollPosition field a number field
  2. What option do I use in the workflow to set the current page scroll position when the page is loaded

Thanks again for all your help!

1.yes
2.action: elements->scroll to

This only seems to give me the option to scroll to a specific element. Can’t see an option to scroll to the saved scrollPosition of the user?

oops yeah my bad i forgot its not there, it really should be though

you scroll with javascript/ toolbox plugin. you can add dynamic expression into for the top:

Ah right. Cool, I’ve added that plugin :+1: So do I need to use Javascript to reference the scroll point? If so, how do I get the scrollPosition of the user in the Javascript?

Thanks again

check that post, it links to another post solved by Faye

This topic was automatically closed after 70 days. New replies are no longer allowed.