Next.js Discord

Discord Forum

Can't Edit Form Populated from DB

Unanswered
Amur catfish posted this in #help-forum
Open in Discord
Amur catfishOP
Hi all, I have my "User Details" page which contains a form. I re-purposed my sign up form as the details are the same, except when in the user details page I make a call to the DB to populate the fields of the user who's logged in. I want the user to obviously be able to edit their details, however i'm having an issue whereby if you attempt to delete a value or a character, it automatically comes straight back so it is actually impossible to enter new values. I'm assuming its to do with how i'm resetting the form and populating the inputs but not sure how to work around this.

I'm using the shadcn Form and React Hook form, below is my SignUpForm component.

Any help would be greatly appreciated, thanks!

0 Replies