Survey form, project #2 snag

Greetings, all:

I am working on the responsive form project, and have a bit of a snag.

I have been working on this for a few days and researched it, but am not quite clear on how my coding is wrong on this.

I am failing on 2 tests for the survey form page. I am not sure why this result is being generated. I was wondering if anyone has any suggestions.

These are the results I want to change.

  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.

I am confused by these results, as it is my impression the code meets the requirements. I have researched and worked with this for several days, I think there must be something about the coding here I am not comprehending.

I was wondering if anyone would help me out here and give me a suggestion on how this is not working.
The code which is is generating this result is here.


<form id="survey-form" action="/actionpage.php" method="GET">

<p><label id="name-label" for="name">Please enter your name <br/>
<input id="name" name="name" type="text" size="35" placeholder="your name"></p>

<p><label id="email-label" for="email">Please enter your email address<br/>
<input id="email" name="email" type="email" size="35" placeholder="@email"></p>

<p><label id="number-label" for="number"> Please enter your age<br/>
<input id="number" name="age" type="number" size="35" min="12" max="100" placeholder="age here" >
</p>


the codepen of this page is here.

https://codepen.io/dwaynebrock/pen/VJabvj

Thank you for your time in advance.

Regards,
Dwayne Brock

What do you have to satisfy this requirement?

1 Like

Greetings, Ieahleen,

It turns out I didn’t have anything to cover that requirement. Thank you for asking that question.

I took it for granted that the input type controlled that validation. It has no effect on validation after all.
I added a “required” to both inputs and the problems are solved.

Should anyone else have the same issue:

Sometimes an issue just needs an extra set of eyes.

Regards,
Dwayne Brock