Is it possible to have something like a multi-step form, like a wizard?
The use case that I am developing this for is something like: (I use 3 different streamlit apps for this now)
I generate a story based on certain parameters.
I click submit, and it generates a storyline.
I can edit that storyline, and when I click submit, I am presented with another form, specifically to use that storyline to create a booklet.
That booklet generation has other parameters that you can set.
When iām happy with that, I click ācreate bookā and I am presented with, yet another form to work on the final parametersā¦
All of these have to work independently of each other, so changing something doesnāt rerun the entire interface, only when I click submit (like a st.form) But, how would one add the functionality to show and hide form controls?
Does anyone know, am I perhaps asking a bit too much of Streamlit in this case?
Yes, this use case is doable with Streamlit, mainly through session state. Youāll probably want to store the values of all the inputs in session state and have a variable in session state that indicates which of the steps have been completed by the user, so that when the app reruns after the user hits the āSubmitā button on one of the forms, the next form can be displayed.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking āAccept allā, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.