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

Fix: form submit blocked after error #2642

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from

Conversation

pbastia
Copy link
Contributor

@pbastia pbastia commented Dec 28, 2024

Work done:

  • Fixes the forms holding onto errors and prevending resubmissions when the server returned an error once.
  • Refactored the navigation logic in a NavigationForm component, to avoid having to implement the funky useEffect everywhere it's needed
  • Updated the various forms to do display server errors

Notable change:

  • submitHandler needs to return a boolean to indicate whether the submission succeeded, server-side

Fixes:

@pbastia pbastia force-pushed the fix/443-form-submit-blocked-after-error branch from bba9b81 to b292c43 Compare December 31, 2024 00:01
@pbastia pbastia marked this pull request as ready for review December 31, 2024 00:27
@pbastia pbastia force-pushed the fix/443-form-submit-blocked-after-error branch from c3631ec to 1ef8b66 Compare December 31, 2024 00:50
@pbastia pbastia force-pushed the fix/443-form-submit-blocked-after-error branch from 1ef8b66 to f0ff8b6 Compare January 3, 2025 19:19
@shon-button
Copy link
Contributor

Form Save & Continue can get stuck in an error loop when an initial error occurs and is ~not cleared?

Example: VerificationForm
image

@pbastia pbastia force-pushed the fix/443-form-submit-blocked-after-error branch from fec5092 to ed46180 Compare January 7, 2025 22:08
@pbastia
Copy link
Contributor Author

pbastia commented Jan 7, 2025

@shon-button thanks for the review! I fixed the issues, but wasn't able to reproduce the last one on the verification form. It looks like some form elements didn't render on your screenshot, very odd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants