Testing Form Issue for Survey Form

So I’m having a major issue with running the tests on the codepen page for the FCC projects in regard to my Survey Form. When I run the tests it gives me 11/17 when I actually have more passed- it just refuses to read acknowledge them.

When I run the test it says I don’t have:

5. Inside the form element, I am required to enter an email in a field with id=“email”. If I do not enter an email I will see an HTML5 validation error.

6. If I enter an email that is not formatted correctly, I will see an HTML5 validation error.

#1 0. For the name, email, and number input fields inside the form I can see corresponding labels that describe the purpose of each field with the following ids: id=“name-label”, id=“email-label”, and id=“number-label”.

11. For the name, email, and number input fields, I can see placeholder text that gives me a description or instructions for each field.

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 at the end for additional comments.’

The only one I haven’t coded yet is the text area part of my form (#15). I’m getting extremely frustrated because I HAVE everything else but it’s saying I don’t and I’m not sure what to do or who to contact.

This link https://codepen.io/August-Rain/pen/KKmYQeZ leads to my work. If you could take a look and let me know if you see anything wrong with the code, as well as who to contact to try and resolve this, I would greatly appreciate the help.

Thanks so much.

Hey,

Try to analyze your HTML, and fix errors

Hi @AugustBlackwood !

Welcome to the forum!

As mentioned, you have html errors that are affecting your ability to pass these tests.

You can pass a few of tests once you fix the id error here

  <label for="email-label" id="email">Email<strong>:</strong>
    <input type="email" name="email" id="email" placeholder="someone@email.com" required>
     </label>

For the same email input, you need to reread this part of the error message
#email-label is not defined : expected null to not equal null

For test 13, you need to reread this part of the error message
All your radio-buttons must have a value attribute : expected 4 to equal 0

And then you already know to add the textarea.

When a test fails click the red button to see which test(s) are failing and text to help you correct the issue.
Be sure and read more than just the first line of the failing message. The ability to read and comprehend error messages is a skill you’ll need to acquire as a developer. Ask questions on what you don’t understand.

First, I DID read more than the first line of error code.
Second, the picture you sent there is clearly id=“email” and it’s in the label and the input type. There is also “email-label” right in the beginning of the code for the label.
Finally, I don’t appreciate being told to ask for help as if I’m not already. The forums are quite obviously for getting help so if I’m here in the forum, I’m obviously asking for help because I don’t understand something.

I had no clue I could even do that. That’ll help loads. Thank you so much for the suggestion (and the video explaining how to do it)! I’ll more than likely be back to let you know how it went.

Thank you soooo much for the help.

So I’m back again. :sweat_smile: I analyzed both my HTML and CSS and there weren’t any major issues with the code that would throw off the testing thingy. I had an open div and two duplicate css style codes but that’s it. It’s still saying I don’t have what I listed above, when I actually do; I’m just as confused as I was earlier when I initially made the thread.

Do you by chance know who I can contact to sort this out further?

In the meantime, I copy-pasted my code into word so I can look through it better to see if I can see any errors.

You can’t have duplicate id’s

You wrote id="email" twice.

<label for="email-label" id="email">
 <input type="email" name="email" id="email"

That’s not what I meant by my reply.
What I was trying to say is ask more specific questions on what you don’t understand on the failing test message.

The test is looking for an id of email label.
If you change one of those duplicate id’s to email-label then that will get you to 15/17.

<label for="email-label" id="email-label">

Ok, well done! There are still errors :face_with_symbols_over_mouth: :grinning_face_with_smiling_eyes:, run analyze again, fix errors then run again until everything is fixed or to find all errors in bulk try w3c html validator

Then try to read error descriptions for every FCC test one by one, usually tests say exactly what the are expecting to find in your code

I’m not sure how you did the snippits of my reply but I’ll do my best to respond to all the comments.

On id=“email” and id=“email-label”: Ok, now we’re getting somewhere. I didn’t know they were in the wrong spots. I swapped them places and that fixed that error. Thank you for specifying what was wrong; it didn’t show as an error when I was analyzing the html.

On asking for help:
While I’m not sure how I could be more specific than I was on this thread I’ll make sure to do my best to be as specific as possible when I need help next. And thank you for clarifying what you were trying to say. :slightly_smiling_face:

I’m at 16/17 now- I just have the text area to make.

:face_with_symbols_over_mouth: is right. :joy: Going into word and looking at all the code and the test requirements was hella helpful as was the comments from you and jwilkins.oboe. I was able to read everything better and then fix the errors.

1 Like

Yay! Congrats! :partying_face:
Glad this helped!
Do you know that as a developer you will do this pretty much all the time? :grin:

I would suggest you install an editor like VS Code and not use MS Word to look at code, or code in. Or you can use something simpler like Notepad++.

Thank you! :grin:

:joy: :joy: Yyyep! (I) Sure will! And despite the frustration of not always seeing my mistakes I honestly enjoy the hell out of coding. This is challenging and I love that it is- it makes me think more, learn more, and seeing my code make something is the best feeling in the world. :heart_eyes:

1 Like

Well I don’t code in word- I usually use something like Notepad or Codepen, but what’s so bad about looking through code in MS Word? Word allows my to switch the font so I can actually read what I’m typing better and I can place headings for quicker browsing. I can’t do any of that in Notepad.

Thank you for the editor suggestion- I’m gonna take a look at it; I feel it’s very important to actually have one.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.