Learn HTML Forms by Building a Registration Form - Step 42

Tell us what’s happening:

Hi there

I have given a name in the input for the submissable forms and chose my own name but not correct

Thanks

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Registration Form</title>
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <h1>Registration Form</h1>
    <p>Please fill out this form with the required information</p>
    <form method="post" action='https://register-demo.freecodecamp.org'>

<!-- User Editable Region -->

        <fieldset>
        <label for="first-name" name="first">Enter Your First Name: <input id="first-name" type="text" required /></label>
        <label for="last-name" name="last">Enter Your Last Name: <input id="last-name" type="text" required /></label>
        <label for="email" name="ema">Enter Your Email: <input id="email" type="email" required /></label>
        <label for="new-password" name="new-pass">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
      </fieldset>
      <fieldset>
        <legend>Account type (required)</legend>
        <label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
        <label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>
      </fieldset>
      <fieldset>
        <label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="profile"/></label>
        <label for="age">Input your age (years): <input id="age" type="number" min="13" max="120" name="ag"/></label>
        <label for="referrer" name="refer">How did you hear about us?
          <select id="referrer">
            <option value="">(select one)</option>
            <option value="1">freeCodeCamp News</option>
            <option value="2">freeCodeCamp YouTube Channel</option>
            <option value="3">freeCodeCamp Forum</option>
            <option value="4">Other</option>
          </select>
        </label>
        <label for="bio" name="bi">Provide a bio:
          <textarea id ="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
        </label>
      </fieldset>
      <label for="terms-and-conditions">
        <input id="terms-and-conditions" type="checkbox" required name="terms" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
      </label>

<!-- User Editable Region -->

      <input type="submit" value="Submit" name="sub"/>
    </form>
  </body>
</html>
/* file: styles.css */
body {
  width: 100%;
  height: 100vh;
  margin: 0;
  background-color: #1b1b32;
  color: #f5f6f7;
}

label {
  display: block;
  margin: 0.5rem 0;
}

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15

Challenge Information:

Learn HTML Forms by Building a Registration Form - Step 42

There asking for a name attr in the html file for the four fields not your own name. Use the the console to see your progress, I only did the first one. Hope this helps

I am doing what it says. eg: I put name=“bio” in the textarea and the console still says this: You should give the textarea element a name attribute. PS I would have chosen bio

The console I m talking about is at the top right next to the preview I use this all the time for feed back. Also if it just keeps saying that over and over reset the challenge.

Yes, in the console it says this: You should give the textarea element a name attribute. *PS I would have chosen bio

and I put name=“bio” in the text area

Ok the first label Enter Your First Name : this goes in the input part before required.

Hi !

Your textarea doesn’t have a name attribute and it’s value bio. See I quoted above your textarea element.
Edit: instead you added the name attribute and incomplete bi value to the textarea element’s label.
@iskren500

oh ok before required, let me give it a try

ok, just a moment, I will try

Yes, thanks alot guys, worked.
appreciate the help :slight_smile:

2 Likes