Summary
How do I do a sequence of forms? I want the user to fill out a form, the app computes and answer, and then the user can submit another form based on that answer.
Steps to reproduce
Code snippet:
form = st.form("my_form")
text = form.text_area("put stuff", example, height=200)
submit = form.form_submit_button("Submit")
if submit:
# do stuff
form_2 = st.form("my_form2")
text2 = form_2.text_area("put stuff2", example, height=200)
submit2 = form_2.form_submit_button("Submit")
if submit2:
st.write('stuff based on form2')
Expected behavior:
After filling out the form the user can fill out the second one and then see the results
Actual behavior:
after submitting the second form the system goes back to the original state