@stijnmeershoek
Posted
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 helpful