Survey Form: Issues arising. NEED HELP!

Currently working on the survey form and i have two issues that are currently bugging me that i am yet to understand. Someone please help out. Thank you.
They are

  1. Test 6 is giving issues i am yet to understand. Please clarify.

  2. Test 7 is not displaying currently?. What am i doing wrong?

  3. How do i go about doing Test 10?.

Super stumped, please help.

@tosinwithlove, 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.

The full message for test 6 says

If I enter an email that is not formatted correctly, I will see an HTML5 validation error.
Email field should be HTML5 validated : expected 'text' to equal 'email'
AssertionError: Email field should be HTML5 validated : expected 'text' to equal 'email'

Do you understand what the test is looking for and why it is failing?

Test number 7 is passing. Good job figuring it out.

The user story reads
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".

The full failing message says

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".
#name-label is not defined : expected null to not equal null
AssertionError: #name-label is not defined : expected null to not equal null

Do you understand what the test is looking for and why it fails?

On a side note, do not use the <br> element to force line breaks or spacing. That’s what CSS is for.

1 Like

Tried to do Test 10 as best as i could but it’s still giving issues. I got the first two parts of the test right but the part has me stumped. I don’t know if it’s because that part of the test isn’t displaying correctly on my end or if i am missing something. Please Help!!!

And thanks for the advice on my use of the
element. Was planning to initially fill in all the elements of the test before settling down with CSS or should i apply CSS as i pass each test?.

You’re very close @tosinwithlove.
Let me start by saying you’ve got a little bit of “label-itis” going on with all the labels. In fact, one of the failing tests is because something you have in a ‘label’.

I suggest you revisit the lesson on creating radio buttons and creating checkboxes paying attention to how they are nested.
Another lesson you’re going to want to revisit is the lesson on adding placeholder text…the same principles can be applied to your name, email, etc inputs.

I find it’s easier to complete as many user stories as I can prior doing any styling. Something like a media query will have to wait until I have other user stories completed.

Hi Roma,
Back again. Have a look at my code now and see. I did some cleaning up. Took some of your advice too. User story 10 still bugs me out. Please help!!!.

Don’t want to go through the label-itis route. And i can’t think of any other way of avoiding it.

The user story says “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".”

The failing message says

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".
#name-label is not defined : expected null to not equal null
AssertionError: #name-label is not defined : expected null to not equal null

Here is your code

<label for="name">Name:
  <input id="name" type="text" placeholder="Type in your Name here" required>
</label>

There is no id="name-label" in your code.
And when you correct this, the same test will fail but for the next field. That’s why I say to read more than just the first line of the failing message.

I still went with the label-itis route but i nested the labels within themselves. I then added the id’s to them. Is that even possible?. Never thought i could add an id to a label tag. Guess that’s where my confusion with User Story 10 came from. Do kindly check it out and lemme know now. Thank You

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