Problem with form element

I am making the build a survey form challenge and i have a problem when i run the test. The problem that shows is this, and when i run the probe, isn´t a problem, what am i doing wrong?

4. 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.

My code is:

<html lang="en">
  <head>
    <header>
      <h1 id="title">Test Survey Form</h1>
    </header>
    <body>
      <p id="description">Survey template for future exercises</p>
      <form id="survey-form">
        <input id="name" type="text" value"imanol">
        <label for="name">Name</label>
      </form>  
        </body>    
  </head>
</html>

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

1 Like

Post a link to your project, please.

Did you try adding the required attribute to the element?

https://codepen.io/imanol-asolo-bego-a/pen/vYxvjVV

This is the link, i tried to including the ID in form But the result of test is the same

When you read the full error message you will find that it tells you the name attribute should be required.

When you make that change then the test will pass.

Always read the FULL error message because they are really helpful :grinning:

https://codepen.io/imanol-asolo-bego-a/pen/vYxvjVV

This is the link, i tried to including the ID in form But the result of test is the same

Mostrar texto citado

| jwilkins.oboe
June 15 |

  • | - |

lasjorg:

Did you try adding the required attribute to the element?

When you read the full error message you will find that it tells you the name attribute should be required.

When you make that change then the test will pass.

Always read the FULL error message because they are really helpful :grinning:

Mostrar texto citado

It doesn’t look like you made a change.

Are you confused on how to add the required attribute to the input?

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