Design comparison
Solution retrospective
This is another awsome project from Frontend Mentors...Thanks!
Community feedback
- @khaya05Posted about 2 years ago
Hey Hammid. You did a great job on this project.
Here is another suggestion. You can add a
disabled
attribute on your submit button. This attribute, when specified will prevent your users from submitting your form without submitting any rating.Then whenever a user selects a rating, you can use
.js
to remove thedisabled
attribute by addingsubmit.disabled = false
.You can also have different styles for disabled buttons i.e
button:disabled{ cursor:not-allowed; background-color: inherit; outline: 1px solid white; }
Marked as helpful0@Hamid210545Posted about 2 years ago@khaya05 Thanks!... i will work on that and it will help me a lot
0 - @VCaramesPosted about 2 years ago
Hey there! 👋 Here are some suggestions to help improve your code:
-
The proper way to build this challenge is to create a
form
and inside of it, the “rating buttons” should be built using an Input Radio and it should have alabel
Element attached to it to work as intended and improve accessibility. -
Your “ratings” need to have an
active
property to **indicate **which rating the user selects.
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding! 🍂🦃
Marked as helpful0 -
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