Reset checkboxes after submit is clicked

Hi,
I have several checkboxes. After i click submit i´d like to reset the checkboxes, as new data is shown, but in my case the checkboxes i chose stay clicked. How can i reset them?
kind regards

Hey @fipsi,

First, welcome to the Streamlit Community! :partying_face: :partying_face: :partying_face: :tada: :tada:

The easiest solution is to put your checkboxes in a form and use the clear_on_submit parameter, that way when anyone presses the corresponding st.form_submit_button the widgets will get cleared!

form = st.form("checkboxes", clear_on_submit = True)
with form:
    check_1 = st.checkbox("Click here")
    check_2 = st.checkbox("Another check")

submit = form.form_submit_button("Submit your answers")

Happy Streamlit-ing!
Marisa