I am stuck with the survey form project. only 4/10 tests are passing. please can someone help me? here is my link https://codepen.io/Manpee/pen/abLwqmq.
click on no of test pass button , then freecodecamp will show you what kind of mistakes you have made .
Hello rio, see one of the errors:
can you guide me further, please?:
1 => Inside the form element, I am required to enter my name in a field with id=“name”. If I do not enter a name I will see an HTML5 validation error.
2=> 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.
3=> If I enter an email that is not formatted correctly, I will see an HTML5 validation error.
4 => 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”.
5=> For the name, email, and number input fields, I can see placeholder text that gives me a description or instructions for each field.’
you have this 5 mistakes in your code
Check spelling errors on IDs.
Also input type are different between text, number and email, so you should check you are using the correct validation.
“required” is not the same as “required.”
i hope it helps
for first mistake use required attribute for form validation which is used for if some did not enter that field then it is used to say that , hey user you can’t left this field empty.
second same use required attribute
third same use required attribute
fourth use label in your code for labeling field as instructed
fifth use placeholder attribute
Hello Rio, please note that the above are not my error messages. Unfortunately as a new user, I cannot post all the error messages at a time. Below is the first error message:
1=> I should see either a or
Hello Jafalcon, thanks for your support but I have also tried the above and it did not solve it.
I 've just finished looking again, please chack spelling errors (labe Is no the same as label, Age is not the same as age, Email ≠email… And so on)
Hello @Edumanpete !
First, u must change the <label id="email-labe" for="email"> Email </label>
to <label id="email-label" for="email"> Email </label>
.
Then, change the input type="text"
to input type="email"
And… you must run the Survey Form tests no Tribute Page tests.
Hope that helps!
you need to fix this
1 => you have space in id <h1 id = "title" class="text-center">
you should not give that space after id so syntax should be <h1 id="title" class="text-center">
2 => <label id="email-labe" for="email"> Email </label>
you have spelling mistake here buddy it should be => email-label
here i want to clear you doubt, why is this necessaary that i use this same spelling and the thing is, when you give id name or class name or any thing that is not releted to html syntax then you can give by yourself whatever you want but this is condition of freecodecamp to pass test that it should be same as they mentioned so in real life project you don’t have to worry about this id name spelling until you use this id spelling correct in your css stying.
and as @stefan2007octavian mentioned change that input type text to email , ya you can get that input as text but it’s good to use email.
Thank you all for your prompt support @jafalcon, rio_sanap & stefan2007octavian. I really appreciate. I have spotted the major mistake I was making. I discovered that I was not selecting “Survey form” under the Select test suit before I run my test… It is now fixed and I can go to the next challenge.
it has happened to me a lot.
Now you can flag this issue as resolved of finished (I don’t know how it’s called) but it’s a good practice to finish a topic so you don’t get any responses in old conversations (and you are also saying that the solution is found inside the messages)
Keep coding and I hope to see you around often.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.