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

Interactive Card Details Form

#accessibility#sass/scss
Jimoh Abdulsamad• 110

@buk-ola01

Desktop design screenshot for the Interactive card details form coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


I have a problem on this task, it works fine on desktop tho. So i used the keypress event to handle to the error but when i deployed it and viewed it on mobile it isnt working and what are the possible ways i can handle this?.Thanks in Advance

Community feedback

Haybuka Paschal• 670

@Haybuka

Posted

Hi... Hope this helps (thumbs up if it does). Easiest way to handle error checks is to make use of the onsubmit event attached to the form.

Also, your name field, try using a fixed length for name, or truncate it when you are about to display.Using a long name broke your card UI, and alerts as error display is a bad UX.

The keypress event might work, but it is not the best way to go about it.

Also use the proper semantics for your forms. There is a button element, no need to convert an input tag to a button.

Using the onSubmit event with an error check library like formik, goes a long way to make your work easier, and checks simpler.

0

Jimoh Abdulsamad• 110

@buk-ola01

Posted

@Haybuka Okay....Thanks on the advice on the use of forms, i checked the formik out and it is for react.But i meant what event can i use inplace for keypress for mobile

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