I am displaying a user’s job post that comes from a repeating group - all on the same page. The problem is that when the user refreshes the page (even after saving data), the form goes blank and does not persist their data. How can I make sure their information persists after a page refresh?
Hi there, @calicass83… if I understand your post correctly, you need to use the database or local storage to store the most recently viewed item for a user if you want that item’s data to persist on a form across page refreshes. If you are using a custom state, that won’t work (as I’m sure you already know) because the custom state gets cleared when the page refreshes.
Hope this helps.
Thanks! That makes sense…
Do you have an example by any chance?
Not really… but it could be as simple as having a field on the
User data type that stores the most recently viewed item (you would update the field any time a new item is viewed), and you would use that field to set the initial content of the form’s elements.
Oh, and if you want to learn all about local storage, Keith’s got you covered for sure.
Thanks for the shoutout, @mikeloc!