Design comparison
Community feedback
- @kanuosPosted over 1 year ago
Hi @Kuzitaa, I previewed the site and found some issues - mostly JS issues.
- The form can be submitted with all/some unfilled form fields.
- The validation is not working e.g. - the card holder name should not have digits etc
- Since you're using client side validation - the form submission's default behavior should always be prevented - unconditionally
- A form is submitted only if the button has a
type="submit"
and nottype="button"
. In your HTML form, update the button type. - You used
button.addEventListener('click', completeFormView)
on line 18 as the form doesn't submit on click meaning the form validation is never run. It's a hack and not a good one too. You cannot bypass validation - There is not one
heading
element - try to include ah1
element per page - even if you have to hide it using CSS - Try to use any CSS naming convention e.g BEM and structure your tags and classes accordingly.
- Using
span
to denote the thank you logo is not preferred. It should be animg
element. - You are using absolute units in your style - e.g
width: 280px;
. Using relative units helps in avoiding unnecessary media queries. - Also, if you can - write modular js files and unit test them. It will help you a lot
Apart from these, I think your solution is pretty decent. Fix the issues and re-upload if you can.
Let me know what you think of the feedback - happy coding :)
1@KuzitaaPosted over 1 year ago@kanuos Thanks for the tips. I had problems with the completion screen, when the page was reloaded when the form was submitted, so I only put the type="button". That seems to mess up a lot.
I will reupload it properly. Thanks for taking the time.
1@KuzitaaPosted over 1 year ago@kanuos Thanks for the tips. I had problems with the completion screen, when the page was reloaded when the form was submitted, so I only put the type="button". That seems to mess up a lot.
I will reupload it properly. Thanks for taking the time.
0
Please log in to post a comment
Log in with GitHubJoin 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