Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Practice-30-Form

@SvitlanaSuslenkova

Desktop design screenshot for the Multi-step form coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
4advanced
View challenge

Design comparison


SolutionDesign

Solution retrospective


What specific areas of your project would you like help with?

Any advice?

Community feedback

Mateusz 40

@MateuszSobiech

Posted

Hi, good work. Consider to change state from booleans to number or string. I think it might simplify the code.

  const [stepOne, setStepOne] = useState(true);
  const [stepTwo, setStepTwo] = useState(false);
  const [stepThree, setStepThree] = useState(false);
  const [stepFour, setStepFour] = useState(false);
type StepState = 1 | 2 | 3 | 4;

const [step, setStep] = useState<StepState>(1);

switch(step) { ... }

Marked as helpful

1

@SvitlanaSuslenkova

Posted

@MateuszSobiech thanks, that's a good idea :)

1

@emmanuelranone

Posted

Hi, the design is very well done. The only thing that feels a bit off is that when the validation message 'StepOne_errorText__ABYh5' appears, it changes the spacing between the components. I would suggest finding a way to maintain consistent spacing at all times.

Regards !!

Marked as helpful

0

@emmanuelranone

Posted

@SvitlanaSuslenkova f.e. in 1920 x 1080... Only seen when "Phone number must contain + and 10 numbers" validation is enabled. But it is a detail, the rest is very nice.

0

@SvitlanaSuslenkova

Posted

@emmanuelranone thanks, it's solved. I cut it :D

0

@tesla-ambassador

Posted

Hey! This is a beautiful solution... I'm thinking of doing it as my next challenge. The only problem I faced was with your phone number verification. It only accepts a + followed by 10 digits but my country code has two extra digits, making it 12. I think you could just increase the range of accepted number of digits to be from 10 - 12 digits.

Happy coding!

1

@SvitlanaSuslenkova

Posted

@tesla-ambassador thanks, I just made it as in the design, noone is going to put real number anyway :). Can I ask you a qestion. Have you already got a job as a frontend dev?

0

@tesla-ambassador

Posted

@SvitlanaSuslenkova I put my real number 😭. I haven't yet gotten a job cause I took time off to concentrate on finishing my bachelors... but I'm back at it and hopefully I'll get one soon!

0

Please log in to post a comment

Log in with GitHub
Discord logo

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