Uploaded June 2024 | Updated November 2026, 3 hours ago
Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGrayWebDevRoadmap
Learn how to build a Next.js Modal Form with React-Hook-Form, ShadCN/ui Dialog, Server Actions & Validation, TailwindCSS, TypeScript and more. Creating a modal form that launches from a table of results is a common use case in business applications. In this NextJS tutorial, you will learn how.
π Thank you to daily.dev for sponsoring this video! Stay up to date with their amazingly free curated web development platform: https://daily.dev/dave-gray
π Support me on Patreon β patreon.com/davegray
π Bonus: Supporting Patreon members get the source code for my "Input With Datepicker" component that works with this Modal Form tutorial: patreon.com/posts/patron-exclusive-106135808
β Become a full-stack web dev with Zero To Mastery Courses:
- Complete Next.js Developer: bit.ly/CompNextJSDev
- Advanced React: bit.ly/AdvReactDev
- Junior to Senior Dev Roadmap: bit.ly/WebDevRoadmap-JrtoSr
π© Subscribe β bit.ly/3nGHmNn
π¬ Course Updates β https://courses.davegray.codes/
β Questions - Please post them to my Discord β discord.gg/neKghyefqh
β Buy Me A Coffee β buymeacoffee.com/davegray
π Source Code Example: github.com/gitdagray/nextjs-form-modal
π My Next.js Videos: youtube.com/playlist?list=PL0Zuz27SZ-6Pk-QJIdGd1tGZEzy9RTgtj
π Follow Me On Social Media:
GitHub: github.com/gitdagray
Twitter: twitter.com/yesdavidgray
LinkedIn: linkedin.com/in/davidagray
Next.js Modal Form w/ React-Hook-Form, ShadCN/ui Dialog, Server Actions & Validation
(00:00) Intro
(00:17) Welcome
(00:26) What's Your Story?
(01:41) Next.js Modal with a Form
(02:09) Prerequisites
(02:35) Project Dependencies
(06:09) Example App
(11:56) App Components & Routing
(15:45) Fetching Type-Safe Data with zod-fetch
(17:39) Form Component with react-hook-form
(19:30) Save Alert Confirmation Pop-up
(21:35) Applying & Viewing the Modal
(23:45) onSubmit Function
(25:42) Next.js Server Action w/ Zod Validation
(27:32) Rendering the Form with Server Action Responses
πΊ Video References:
π Next.js Parallel Routes: youtu.be/M836RZxReHU
π Next.js Intercepting Routes & Modal: youtu.be/Ft2qs7tOW1k
π Getting Started with ShadCN/ui: youtu.be/v0_AT8zaLo8
π TypeScript Course: youtu.be/gieEQFIfgYc
π Tutorial References:
π Next.js: nextjs.org
π Next.js Parallel Routes: nextjs.org/docs/app/building-your-application/routing/parallel-routes
π Next.js Intercepting Routes: nextjs.org/docs/app/building-your-application/routing/intercepting-routes
π shadcn/ui: ui.shadcn.com
π shadcn/ui Dialog component: ui.shadcn.com/docs/components/dialog
π react-hook-form: react-hook-form.com
π Zod: https://zod.dev/
π zod-fetch: npmjs.com/package/zod-fetch
π @hookform/resolvers: npmjs.com/package/@hookform/resolvers
Was this tutorial about Next.js Modal Forms including react-hook-form, ShadCN/ui, Server Actions and Zod Validation helpful? If so, please share. Let me know your thoughts in the comments.
#nextjs #modal #form
Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGrayWebDevRoadmap
Learn how to build a Next.js Modal Form with React-Hook-Form, ShadCN/ui Dialog, Server Actions & Validation, TailwindCSS, TypeScript and more. Creating a modal form that launches from a table of results is a common use case in business applications. In this NextJS tutorial, you will learn how.
π Thank you to daily.dev for sponsoring this video! Stay up to date with their amazingly free curated web development platform: https://daily.dev/dave-gray
π Support me on Patreon β patreon.com/davegray
π Bonus: Supporting Patreon members get the source code for my "Input With Datepicker" component that works with this Modal Form tutorial: patreon.com/posts/patron-exclusive-106135808
β Become a full-stack web dev with Zero To Mastery Courses:
- Complete Next.js Developer: bit.ly/CompNextJSDev
- Advanced React: bit.ly/AdvReactDev
- Junior to Senior Dev Roadmap: bit.ly/WebDevRoadmap-JrtoSr
π© Subscribe β bit.ly/3nGHmNn
π¬ Course Updates β https://courses.davegray.codes/
β Questions - Please post them to my Discord β discord.gg/neKghyefqh
β Buy Me A Coffee β buymeacoffee.com/davegray
π Source Code Example: github.com/gitdagray/nextjs-form-modal
π My Next.js Videos: youtube.com/playlist?list=PL0Zuz27SZ-6Pk-QJIdGd1tGZEzy9RTgtj
π Follow Me On Social Media:
GitHub: github.com/gitdagray
Twitter: twitter.com/yesdavidgray
LinkedIn: linkedin.com/in/davidagray
Next.js Modal Form w/ React-Hook-Form, ShadCN/ui Dialog, Server Actions & Validation
(00:00) Intro
(00:17) Welcome
(00:26) What's Your Story?
(01:41) Next.js Modal with a Form
(02:09) Prerequisites
(02:35) Project Dependencies
(06:09) Example App
(11:56) App Components & Routing
(15:45) Fetching Type-Safe Data with zod-fetch
(17:39) Form Component with react-hook-form
(19:30) Save Alert Confirmation Pop-up
(21:35) Applying & Viewing the Modal
(23:45) onSubmit Function
(25:42) Next.js Server Action w/ Zod Validation
(27:32) Rendering the Form with Server Action Responses
πΊ Video References:
π Next.js Parallel Routes: youtu.be/M836RZxReHU
π Next.js Intercepting Routes & Modal: youtu.be/Ft2qs7tOW1k
π Getting Started with ShadCN/ui: youtu.be/v0_AT8zaLo8
π TypeScript Course: youtu.be/gieEQFIfgYc
π Tutorial References:
π Next.js: nextjs.org
π Next.js Parallel Routes: nextjs.org/docs/app/building-your-application/routing/parallel-routes
π Next.js Intercepting Routes: nextjs.org/docs/app/building-your-application/routing/intercepting-routes
π shadcn/ui: ui.shadcn.com
π shadcn/ui Dialog component: ui.shadcn.com/docs/components/dialog
π react-hook-form: react-hook-form.com
π Zod: https://zod.dev/
π zod-fetch: npmjs.com/package/zod-fetch
π @hookform/resolvers: npmjs.com/package/@hookform/resolvers
Was this tutorial about Next.js Modal Forms including react-hook-form, ShadCN/ui, Server Actions and Zod Validation helpful? If so, please share. Let me know your thoughts in the comments.
#nextjs #modal #form










