I was wondering if there is a way to set the value of the the submit button to True right after the user clicks on it, unless the user refreshes the page? I know it does change to true right after the user click on it automatically. However, I want to make sure it doesn’t go back to false if the user clicks on another submit button.
I think there must be a way to do so with the session button, but I don’t know how.
You can use session_state to store information if you need to extend the memory of buttons. I just recorded a tutorial if you want to check it out. Session State Introduction
You can add a callback function to your form submit button like this:
if 'submitted' not in st.session_state:
st.session_state.submitted = False
st.session_state.submitted = True
# Your Form Here
Thanks so much! I solved my problem !
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.