Design comparison
Solution retrospective
Before I've done this project i should think of radio buttons before making it. but without radio buttons, can i make the clicked states saved after redirecting to the thank you page?
Community feedback
- @pradeeps4iniPosted over 2 years ago
Hi, @ManaIsrael. Congrats on completing the challenge.
Why are you writing seperate markup and styles for each selected rating?
You could have written a card and display the chosen rating and message using JS in that card.
-
Use <input> for options to chose rating. <p> is used for paragraphs. <input> is used when you want user to provide some data to you. Using <input> is more semantic and better for readability and accessibility.
-
Here is a small demo i wrote for the rating and displaying a message with chosen rating value. You can modify and learn from it. https://codepen.io/pradeeps4ini/pen/qBojyLK?editors=1111
-
You can make the clicked state saved by storing the clicked rating element's id in a variable.
Marked as helpful1@ManaIsraelPosted over 2 years ago@pradeeps4ini I saw your solution, I could have done mine that easy. Thank you it helped
0@pradeeps4iniPosted over 2 years ago@ManaIsrael, i am glad i could be helpful. Have fun learning.
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