Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting the clear_on_submit parameter always clears, even when undesirable #199

Open
robinzimmermann opened this issue Aug 21, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@robinzimmermann
Copy link

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.

@robinzimmermann
Copy link
Author

robinzimmermann commented Aug 21, 2024

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.

@mkhorasani mkhorasani added the enhancement New feature or request label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants