I’ve created dynamic dropdown using group focus for my Settings options on the menu. Each option is a navlink opening the specified options page rather than having them in a repeating group. When the user clicks on Settings, the options show. However when the user clicks on one of the options, the dropdown closes forcing the user to click on settings to view the options again.
How do I keep the Settings options open until the user clicks to close it?
If you’re redirecting the user to the same page and only sending URL parameters to change the page view, the Group Focus should remain open, unless you add a “hide group focus” action after the user clicks on the Repeating Group cell. However, if you’re directing the user to another page (which wouldn’t be a best practice in this case), the Group Focus will default to closed. In that scenario, you would need to send a parameter in the URL (e.g., gf=visible) and create a workflow “Do when Get gf from page URL is visible” with a “Show Group Focus” action.
This is not true, the group focus element will close automatically once a user clicks anywhere, whether that be in the group focus or outside of the group focus and this is true whether or not the user is directed to another page or stays on the same page, that is just how the group focus element works.
@eru there are various ways to do this, one is much more complex than others, so just sticking to the simplest way…add a custom state somewhere that is ‘gf_is_open’ and it is of type yes/no. That is going to be the key to controlling whether or not it stays open or closes.
So when the user clicks onto the element that will first open the groupfocus, you change that custom state of ‘gf_is_open’ to yes…then when you provide the user with an element to click to close it, you change the custom state value to no.
Then in workflows, create conditional workflows, so that when ‘the groupfocus is not visible and groupfocus ‘gf_is_open’ is yes’ to run action to show the groupfocus so that the fact the close was unintentional as per the custom state value of ‘is open’ being yes, you can make sure the groupfocus is shown again (this might create a bit of a flash, but for most part I do not see this).
When clicking outside the group focus, it closes, but when clicking on any element inside it, it remains open unless you add a hide action or change pages.