Forms -- clear_on_submit


I seem to have come across some contradicting references and wanted to ask: do forms have a ‘clear_on_submit’ argument?

A ‘stable’ reference at API reference — Streamlit 0.82.0 documentation does not list the optional argument, but a ‘latest’ reference at API reference — Streamlit 0.82.0 documentation does.

Perhaps there is a distinction between ‘stable’ and ‘latest’ I am not aware of? I am on the latest release though.


Welcome to streamlit community :cold_face:. Let’s get things more clear:

  • First, did you read the Introduction to Submit Button for a Form? which can be founded at

  • Second, stable version means the software or app is tested and its bug free :eyes:. Sometimes latest version (last version release) can have bugs, problems…according to Google.

  • Third, submit button for forms have a different particularity from normal button, since the first (according to streamlit) lets you batch input widgets together and submit the widget values with the click of a button — triggering only a single rerun of the entire app. The second doesn’t do that, he rerun all app after every changed the user do in an input value.

Hope this can help you in your studies! :sunglasses:

latest refers to the most recent commit on GitHub, which will always be equal to or ahead of the most recent published version of Streamlit. So in the case of your question, that functionality will be present in our next release.