Forms with no submit button #13046
Replies: 1 comment
-
Hi @nareshbhatia !! It’s not very common to design a form with no submit button — most UIs bundle fields together so the user can review before sending. That said, if each field is truly independent, you can just treat them like individual mini-forms: attach an onBlur handler to each input that calls your API with just that field’s value + validation. react-hook-form is optimized for handling groups of fields and a single submit event. You can still use it for validation onBlur, but if you don’t need cross-field state, a simpler approach is just: <input So the way to think about it: If fields are independent → each is its own “form” (manual onBlur handler). Your design is unusual but valid if the use case is quick, independent edits. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on a design where the form has no submit button. Each field must submit
onBlur
. The design rationale is that user should be able to quickly enter the necessary information without having to click a submit button. Each field should perform independent validation. There are no dependencies between fields.Is this a common requirement? How should I think about it? Treat each field like a form? It appears that react-hook-form is all about coordinating multiple form fields and submitting a single form value on Submit. I don't see any examples of treating each field individually and submitting onBlur.
Beta Was this translation helpful? Give feedback.
All reactions