I want to disable the form submit button after the button hit. And after processing the form submit request, I want to enable the form button again.
I have tried following snippet. But it does not work. Maybe form is not rerendered.
def handler(): st.session_state.submitted = True st.form_submit_button(..., disabled=st.session_state.submitted, on_click=handler) # ... after some code, finishing the process st.session_state.submitted = False
If applicable, please provide the steps we should take to reproduce the error or specified behavior.