How to hide an element?


Having one element on the user profile, (one page app), element is not visible, but once a user clicks on a button.

If user don’t collapse the (now visible) element, the element is still visible if user goes to another user profile, which is not appropriate in this case.

What would be options to hide the element, if user turn around and engage with the app?


It sounds like you would benefit from custom states instead of just hiding and showing elements on the page. It’s what I use for my one-page app.

Check out the video and article here: Using Custom States - Bubble Docs

1 Like

Hey @another ,

I have faced the same issue. You need to use a custom state in order to hide and show elements.

First, create a custom state on the page. Set the type of the custom state name navigation and data type as text.
On click of the sign-up button set the custom state to login and set the condition for the signup pop when the custom state value is signup then the signup pop is visible.
Do the same for the login popup instead of signup pass login value in the custom state and set the conditional when the custom state value is login the login pop is visible.

If any further assistance is required get in touch with me on:

1 Like

Thanks guys @jordanryankennedy_as and @karamwise

Custom state crossed my mind as well, wheras it is easier to show an element, because it only one button can trigger that, but for hiding of the same element, you can go “away” in few directions, so for me to add in each flow to set up a custom state, so that this element is hidden, is not sustainable solution here, especially as we speak of a menu which is clicked many times for other reason that this (hiding/showing) element.

For example, have tried with to add a condition to the element, and saying, when parent group is not visible, or when element is not visible, to make this element not visible, although sounds bad, but something along these lines. Any ideas?

Going to make the element as a popup that can’t be closed with “Esc”…

This topic was automatically closed after 70 days. New replies are no longer allowed.