Hey @Chakra !
Welcome to the Streamlit Community!
The issue your running into here is because on each button click Streamlit reruns the script from top to bottom, thus it resets your application choice click. There are ways around this if you use Session State, or if you do a bit of trickery with the order that you call your functions in along with pickling some info.
I have attached links to some other discussion that may help!
Edit: Streamlit 0.84.0 has officially introduced session state. Go check it out: Session State for Streamlit
Hello there
For a project I needed to build multi-page app with a settings page. As I’ve seen this topic requesting the feature, I decided to share the solution I came up with. It features a custom version of @thiago ’s SessionState .
It still relies on hacks, but it should work in most cases. It was tested with Streamlit version 0.61.0 (and now 0.65).
Things you must…
UPDATE: Streamlit now has official support for Session State! More info here
Hey Community ,
In a lot of ways getting a Streamlit app to store internal state, like information a user entered in a form, is simply too tricky. We’ve created some workarounds for session state , but we want to give you a baked-in, elegant version of programmable state so you can build apps with intricate sequential logic, such as multi-page apps.
We’d like to use this topic as a central location for your idea…
Hi. I have been handed over an MultiApp which is used to collect information about products, i.e. it is a questionnaire with a few categories. Within each category there is a set of questions. Each category is created a separate app on the left hand side. Is there a way to have a ‘Next’ button on the right hand side which will direct the user to the next category/page from the right hand side. [Screenshot 2020-10-23 at 20.57.13]
it would mean moving from Home to Resources by clicking a button …
Hope this is helpful!
Happy Streamlit-ing!
Marisa