Stale formState when we change input after submitting the form #11431
Replies: 1 comment
-
One of our validation rules was failing when submitting again with updated radio button value cuz some other radio input had it's previous value when we came back and tried to submit again. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using v7.48.2, I have a series of forms in various pages. I am encountering an issue here.
I have a page with few radio button questions, when I submit the page and go onto the next page, it works fine as initially formState did not have any values so my validation worked and then saved the state.
Now I come back to the submitted page, with all the selected radio buttons intact. Now when I change one radio button and try to submit the form, the form runs validations on old values which I submitted.
So how should I set it up so that I have updated values in formState when I submit the form.
I am using onTouched mode and useFormContext for nested forms.
Beta Was this translation helpful? Give feedback.
All reactions