Design comparison
Solution retrospective
I have a question on the Javascript part , how do i store the highlighted cliked rating value to display on the next page and not the last clicked value ( the 1,2,3,4,5) from the rating...finding this challenging
Community feedback
- @stijnmeershoekPosted over 2 years ago
Instead of using normal buttons you could use radio buttons inside a form. This would save you from having to use ANY JavaScript to store the value of it. And when you submit the form it will pass the current value.
Have a look at my solution if you need any help on how to do this. Or just reply to this comment
My solution: https://www.frontendmentor.io/solutions/rating-component-with-radio-buttons-and-a-minimal-amount-of-javascript-ry3vuf9f9
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