Forum Academy Marketplace Showcase Pricing Features

Dynamically fetching text from sub-menu into a text box

Hello everyone,
I have started building using bubble :slight_smile: But like every beginner I am stuck to my wits end on a problem which might have an easy fix as per the experts here :slight_smile:

I have made Collapsible menu with a sub-menu using Option-Sets. Now, I want to show the “clicked” option in a text box dynamically - which will act as the heading of a page.

Hi there, @jhaabheeshek… if I understand your post correctly, two ways to do what you have described immediately come to mind. You could set a custom state to the sub-menu option that is clicked, and you could have the page heading reference the custom state. However, because custom states are reset when a page is refreshed, this option might not be the best way to go.

Another way you could go is to have a field on the User data type that you update with the appropriate sub-menu option when an option is clicked, and you have the page heading reference that field. True, it might seem a bit “heavy-handed” to save the clicked options like that, but you might be able to use that field to “remember” a user’s place in the app (if you aren’t doing that in some other way already), so maybe such a field could be useful for multiple purposes.

Anyway, I hope this response helps, even if it’s just food for thought.