mkhorasani/Streamlit-Authenticator

Setting the clear_on_submit parameter always clears, even when undesirable

Opened this issue · 1 comments

There are times when you want the form to clear if successful, but not if it fails. For example:

  • Fill in the register new user form.
  • But make the password something that will be unacceptable, like abc.
  • When you submit the form, it clears. Now you have to fill in every field again, not just the password field.

I would like the form to clear if the submission was successful, but not clear if there was an issue with one of the fields.

FYI st.experimental_rerun() is now just st.rerun(). But it doesn't have the desired effect, it left the form fields still populated even when the submission was successful.