st.form(key: str, clear_on_submit: bool = False)
A string that identifies the form. Each form must have its own key. (This key is not displayed to the user in the interface.)
If True, all widgets inside the form will be reset to their default values after the user presses the Submit button. Defaults to False. (Note that Custom Components are unaffected by this flag, and will not be reset to their defaults on form submission.)
Still have questions?
Our forums are full of helpful information and Streamlit experts.