I’m still wrapping my head around reusable elements, and I’m not sure if this is possible or if I’m missing the obvious.
I wanted to create a custom-designed reusable element for alert messages (didn’t want to use the default Bubble alert elements). I’ve created the reusable element for success messages (will do a similar one for errors and warnings), but am trying to figure out how would I replace the alert message content for each instance, i.e. each time I use this reusable element on a page.
As you can see in the image, I’d like to replace the Lorem Ipsum text with the appropriate message for each instance of this reusable element on my page, but I can’t seem to change the text for each instance. And changing the text on the reusable element itself kind of defeats the purpose of using reusable if I have to create 20 reusable elements, one for each alert message.
I’m definitely doing something wrong here but can’t figure out what. Any help is much appreciated. Feel free to recommend a completely different approach too – I’d love to see how you set up your alert messages.
I normally add a set state to the reusable element. You can call it something like alertText or something. Then when you show or animate the reusable element, you can set the state in the same workflow as well. Let me know if that helps.
I normally just throw on a toast notification for most of my needs. There are a few plugins for that.
Yeah set a state on the reusable that you have on the page. You will be able to read that state on the outer group of the reusable element. Then just change your text with a conditional.
Aha! Thanks. I ended up with a convoluted work around of adding a database type called “Alert Messages” and then ended up calling the Parent Group’s alert messages for each instance 🤦
But using states is so much cleaner and simpler. Thanks a bunch.