Is there a way to recover a form state from history/disk

  1. Are you running your app locally or is it deployed? locally

if a user want to rerun a form they submitted a while back, what’s the best way to support that?

Hi @Tony_Zhang,

Thanks for sharing your question! To enable users to access data they entered into a form in the past, you’d need to save the form input to a database or data source, and then you’d need to make a call to that database when the user wants to access their past form submissions (check out our guides on connecting Streamlit to data sources here and our doc on st.connection here.

1 Like

thanks Caroline! do you know where I can find an example where st.form and st.connection is used together!

I don’t have an example on hand of using st.connection with st.form, but there’s an example in this thread of using st.form and writing the form input to a database that you might find helpful – you could definitely sub in st.connection in this example

perfect thank you!

1 Like

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