Custom input with react-hook-form not retrieving any values
Unanswered
Northeast Congo Lion posted this in #help-forum
Northeast Congo LionOP
https://stackblitz.com/edit/stackblitz-starters-xwtaxu?file=app%2Fpage.tsx I've integrated react-hook-form in my form, that is using a custom Textfield component. I've followed the react-hook-form guide, but when I click submit the values are not updated. They are blank. Can it be something related to nextjs that I'm forgetting ?
3 Replies
Northeast Congo LionOP
can anyone help me ?
1. You need to pass default values to
2. It is better to use
3. Remove
useForm, such as an empty string2. It is better to use
register(label) directly instead of passing the function through props3. Remove
onBlur prop from input, it overrode the one returned from register function