Skip to content
Submitted over 3 years ago

HTML, CSS, and Javascript (jQuery) for Dynamic Form

jquery
LVL 2
@WhaleMentalist
A solution to the Interactive rating component challenge

Solution retrospective


This challenge was tougher than I expected. Stylizing the radio buttons was interesting. I ended up using 'display: none' to hide the radio buttons themselves and used the labels associated with each button. It actually ended up looking pretty good, but I am not sure if it was the proper way to do it. The rest of the form was pretty straight forward.

The jQuery was used to allow the user to be presented with another card after rating submission. I ended up using the 'hide()' and 'show()' to exchange out the rating and thank you cards. The functions allowed the cards to be animated for a smoother effect. The only odd thing was I needed to add a 'event.preventDefault()' to prevent the submission from redirecting. My understanding is the function is a way of saying "Hey, I got things handled here, no need to do anything". I do wonder if this is a common thing or if there is a better way to handle this odd scenario.

Code
Loading...

Please log in to post a comment

Log in

Community feedback

No feedback yet. Be the first to give feedback on Spencer Daniel’s solution.

Join 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