How to make an element appear on all pages for all people looking at the page when a user clicks a button

I’m trying to make a toggled notification at the top of every page when a user clicks a button that appears for everyone else using the page without them having to refresh.

Is this possible? If so any help would be greatly appreciated.

I think it is doable thru the database. Bubble uses a real-time database. You have to make the changes not specific to the users so that all the users accessing the webpage can get the notification.

That’s what’s I was thinking, using a database. But I cannot for the life of me figure out how when you click a button it changes the true to false in the database and vice versa with the same button, and then tells the element to be visible based on that variable.

You can do this on thru the workflow. Please create what your are trying to achieve in the forum app so that we can easily help.

Will make it later on due to the holidays.

and on that note… Happy holidays!

1 Like

Here you go!

The issue I have is I don’t know how to get the workflow to change the “thing” (ALERTFORALL). Every time I try it gives me errors and makes me input more fields into the “thing to change” field.

Should be when button is clicked, make a change to:

Search for ALERTFORALL :first Item" > active = yes or no depending on the group

That work for you?

I think you had the groups triggering it. I changed to buttons.

2 Likes

@romanmg I was the one implementing the toggle button when you show up and add the notification :wink:. That is exactly what should be done. As bonus, he has a functional toggle button.

2 Likes

@BubbleCoach @romanmg Thank y’all so much for the help, got it working on my app :smile:

2 Likes