Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Multi-Step-Form using react-hook-form and Zod validation.

next, tailwind-css
Creedyfish•80
@Creedyfish
A solution to the Multi-step form challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


The code is scuffed because it took me about 2 days to do step 3 with the checkboxes. it would have been fine if I only took the names of the checkboxes, but I also had to consider the prices of each box based on the choice in step2 so that means I have to create an array of objects and unfortunately. inputs cannot set objects as their value. Unless I am wrong, please do provide some info on how to do that. I have been at this for at least 2 weeks, so this challenge really beat the hell out of me. sorry for the language.

I would really like to know If I could have solved most of my problems in a more efficient and less "brute force" way of coding especially in step 3 where I brute forced the checkboxes with its functions. am I using react-hook-form correctly? what should I learn more about when it comes to that?

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • qadzek•580
    @qadzek
    Posted over 1 year ago

    Take a look at this solution.

    Marked as helpful

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub