Select Element/ID Attribute

Hey guys :blush:

It’s me again.

May you kindly please assist.

Problem Statement: Link the applicable form elements and their label elements together.

Use profile-picture, age, referrer, and bio as values for the respective id attributes.

Solution:

   <fieldset>
        <label for="profile-picture">Upload a profile picture: 
          <input id="profile-picture" type="file"/></label>
        <label for="age">Input your age (years): 
          <input id="age" type="number" min="13"
          max="120"/></label>
        <label for="referrer">How did you hear about us?
          <select>
            <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>
          <input id="referrer"/>
          </select></label>
        <label for="bio">Provide a bio: 
          <input id="bio" type="file"/></label>
          <textarea></textarea>
        </label>
      </fieldset>

Link to challenge:

Learn HTML Forms by Building a Registration Form: Step 38 | freeCodeCamp.org

Error message hint:

The select element should have an id of referrer.

Which is what I feel I’ve done but could be missing something.

:pray:t6:

Don’t add any new elements.
Just link the ones that are already there.

I’m sorry but I don’t understand.

Please elaborate :pray:t6:

Wait, was able to figure it out and excluded the “input” element as you suggested.

Thank you so much :sunflower:

1 Like

Your solution is almost correct, but the select element should have its id attribute set to referrer . Also, the textarea should have its id attribute set to bio .

:smiley: :smiley:

1 Like

Yeah, eventually figured it out :sweat_smile:

Thank you so much Nathan :blush: :pray:t6:

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