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
Test 6 is giving issues i am yet to understand. Please clarify.
Test 7 is not displaying currently?. What am i doing wrong?
@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.
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!!!.
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