Data on previous page

Hi community,

I need a little help with app. I have a search bar where people can search restaurants near them.
My issue is that once the list of nearby restaurants appear and the user clicks on one of them to view more and press back to go back to the list so he/she can select another restaurant from the list, the data disappear. The user has to perform a new search.

How do I fix that? At least allow the users to go back and forth between the list and a specific restaurant!

Thanks

Hi,

Would it work if within a table (I would use the User table) have a field I would call “Last Search”. In here save the value the user has last selected when they navigate to a new page. Then set the default value of the search to this “Last Search” in the table.

Would this work for you?
Thanks,

The common approach is to use a URL parameter to set and “preserve” your search. So, when a user selects an option, you update a parameter in the URL. Related to this, you set the constraints of your search / data source based on the parameters in the URL.

Try performing a search on Yelp and pay close attention to what happens to the URL as you look through search results and navigate to a specific business page.

Yelp will “navigate” to a new page, which includes the specific parameter - ex. “find_desc=thai” (https://www.yelp.com/search?find_desc=thai&find_loc=saratoga)

Then, a specific restaurant page has that context in the URL (https://www.yelp.com/biz/bai-tong-thai-bistro-saratoga?osq=thai)


Dan (creator of LearnTo - 15+ hours of Bubble tutorials and live coaching)

2 Likes

Hi Dan,

Thank you for the help. I will try and enroll to your course as well. Thanks

1 Like