const { handleSubmit } = useForm(); const onSubmit = data => { console.log(data); }; //... <form id="hook-form" onSubmit={handleSubmit(onSubmit)}> {/* your awesome form */} </form> <button type="submit" form="hook-form">Submit</button>