App-wide Custom States

@Bubble - Custom States are a great feature on pages, however when trying to span several pages (e.g. when offering a dynamic guest browsing experience before signing up a user) Custom States are very limited so URL parameters must be used. It would be great it App-wide Custom States were available for this purpose (and I am sure many others). Thanks for the consideration!

2 Likes

Have you tried simply storing the data that you want to preserve across pages with the user?

1 Like

Yes, it would get stored on a cookie anyway if there was no user, and that would no doubt be how you could do a global state too.

Works the same.

Thanks guys, but I don’t fully understand. @sudsy: Current User does not reference records stored in the database for a session that is across pages for non-signed-in users (at least I can’t get it to work). @NigelG: Can you please elaborate how you would implement this currently on Bubble? Thanks!

There is always a ā€œUserā€ even if they are not signed in. So you can store something on a User field on one page, and it will be available on all other pages in your app as long as the user in on the same device/browser.

@NigelG : Thanks, however I have attempted this several times by creating a ā€˜temp’ Custom Data type, storing data there, and they trying to reference it on other pages with Current User. That does not work for me.

@romanmg any thoughts on this as discussed a few days ago please?

Thanks.

In your WF, make changes to a user and set the field. I had never actually tried it myself, so I put together a simple demo here…

https://burst-my-bubble.bubbleapps.io/version-test/visitor-page-1

Works great! Hopefully, that helps somewhat.

EDIT: And here’s a link to the editor page…

1 Like