Unform
Manual form submit
Manual form submit
With Unform, you can submit your form without a submit button using the
submitForm
function exposed by form reference.
1export default function SignIn() {2 const formRef = useRef(null);34 function functionThatSubmitsForm() {5 formRef.current.submitForm();6 }78 return (9 <Form ref={formRef} onSubmit={handleSubmit}>10 <Input name="email" type="email" />11 <Input name="password" type="password" />12 </Form>13 );14}