Second challenge creating a Survay

I finished the second survey challenge and I want to know if you like it. (Solved)

Survey Form

Hey @DanAmbitious,

You got three user stories to pass the test:

  • 13. Inside the form element, I can select a field from one or more groups of radio buttons. Each group should be grouped using the name attribute. Each radio button must have a value attribute.

  • 15. Inside the form element, I am presented with a <textarea> at the end for additional comments.'

  • 16. Inside the form element, I am presented with a button with id="submit" to submit all my inputs.

Additionally;

  1. There are typos which creates an error in your code:
<label class="label-dropdown">What do you think is the most important place for us to improve on?</lable>

<label class="label-radio">How did you find us?</lable>
  1. You have used the same value attribute for radio inputs which is not correct. You may want to re-visit the following lesson:
  1. At the end of your HTML document, there is an opening div tag, which belongs to the div element with a “background” class. So it should be the closing tag.

The final tip is, you should run your HTML code over W3C Markup Validation Service, It’s a great tool to see your coding issues.

Cheers,
Yigit

1 Like

Do you mean do it like this name="radiobox"?

I changed input to button for my submit element, but that made the button disappear and the score didn’t increase.

  1. For test 13, read this challenge again.

  2. For the button it has to be an input element with the type attribute set to submit, it must also have an id of submit (id="submit").

  3. input elements can not have content inside them, they are void elements which means they do not have a closing tag.

Just a couple of additional things;

  • Don’t use <br> to force spacing.
  • Why change the cursor to a pointer when hovering over the title? It’s not a link.

I added the attribute value="radio", but it didn’t increase the score.

What should I use instead of <br>?

For instance, you could have the name in a <div>, the email in another <div and the age in yet another <div>

You have a <br> after a <p> element. There you would use margin and/or padding in CSS.

Take a look at the sample project and some other forms to see sample of how things are grouped.

I was referring to what it says about the name attribute for creating a group. Anyway, you are passing all the tests now, so you fixed it.