Next.js Discord

Discord Forum

How to perform a "PATCH " and "PUT" functionality using server actions to a nested form component ?

Unanswered
Long-horned bees posted this in #help-forum
Open in Discord
Long-horned beesOP
I'm fairly new to Next.js server actions and want to try out a few things. Within my app/admin/products page, data is fetched from MongoDB to return all products and mapped with edit and delete buttons. The thing is, I wish to use the same input fields (form) to perform product editing and product creating. I'm unsure how to invoke server functions and populate the form with the requested product patch ID data.

1 Reply