Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Interactive component with rating

@Wellington-Lucas

Desktop design screenshot for the Interactive rating component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I had difficult to know which of input types i can use for the "rating options". I didn't use javascript because i dont know where i can place a function to return the input values(rate).

Community feedback

@MerMory-Alloc

Posted

Hi @Wellington-Lucas,I hope you are doing well. I took a look at your code and I think it would be better to set the form's method attribute to "post" so that the page does not reload.

Regarding JavaScript, you can get the value of the checked rating like this

function enviar(elementoSelecionado) {
let value=elementoSelecionado.value ;

\\"Then, write code to make the form disappear and the thanks section appear.
    
}

Marked as helpful

1

@Wellington-Lucas

Posted

@MerMory-Alloc Thank you for the answer, i managed to put the value inside the second "card", but the solution with the method "post" did not work. So I found a solution on a forum with the .preventDefault() method

1

@MerMory-Alloc

Posted

@Wellington-Lucas well that's a better solution, :) happy that works.

0

Please log in to post a comment

Log in with GitHub
Discord logo

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