After several hours trying to solve this, I’ve found a way!
First, to be clear, I really needed a Focus Group as I want to “show” a floating element on the page that comes from an Reusable Group (Header) that is present on all pages of the application. I will use this as a persistent location to update data thru out the application. A “Group” or “Floating Group” would sort of work, but the Header reusable element gets over the page and it is a mess.
I’ve made several different approaches, tried workflows, javascript, debugged Bubble.io code and nohting worked. The trigger that is installed on all other objects is simply too difficult to remove or prevent. Then I had a new idea came about. What if we don’t care about that trigger and tell the browser to simply ignore it? Since the display block/hidden is a CSS style, this could be as easy as changing the ID of the elements.
So the solution for me was:
- create an variable at the reusable element that has the status of visibility desired (show_panel), it starts as “no”
- on the element set it’s “ID” as a “element_always_hidden”
- on the same element, add a condition that when “show_panel” is yes, set “Element ID” to “element_always_visible”.
- on Application settings SEO/MetaTags, add the following CSS:
<style>
#element_always_hidden {
display: none !important;
}
#element_always_visible {
display: block !important;
}
</style>
- Because all focus group are not loaded by default, we must “load”, for that we must specifically “show” the element. On Workflow Load Page show Focus Group
How does it work? Iif the variable “show_panel” is “no”, then the condition is false sets the element back to “element_always_hidden”. If the variable is “yes”, then the condition is true and sets the element to “element_always_visible”.
On page load it will never shows up because of the CSS that forces it to be hidden (default ID)
All the triggers are set through out the page, but we don’t care… any event will be unefective because of the CSS.
To control the focus group, just flip the “show_panel” variable “yes” and “no”.
1 Like