St,option_menu

Hello
for my project i use st.option_menu that make different pages for my streamlit web app.
the second option from the menu need information that we take from user in the first option.
but when I click on the second option of the menu, all of the information of previous step was deleted.
I want to link information to each other in different part of the menu.
how can I fix it?
please guide me.
thanks.

Streamlit executes all code that’s in scope in it’s current rerun. So, if your two pages have separate scopes then they can’t be connected in any way except by sharing data. You can achieve sharing data between different rerun scopes using st.session_state.

HTH,
Arvindra

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.