# Survey Form Error Assisstance

**URL:** <https://forum.freecodecamp.org/t/survey-form-error-assisstance/466497>\
**Category:** I Built This\
**Created:** [June 25, 2021, 11:01am UTC](https://forum.freecodecamp.org/t/survey-form-error-assisstance/466497 "2021-06-25T11:01:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbs2527](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bbs2527/32/206143_2.png) [@bbs2527](https://forum.freecodecamp.org/u/bbs2527)\
**Post date:** [June 25, 2021, 11:01am UTC](https://forum.freecodecamp.org/t/survey-form-error-assisstance/466497/1 "2021-06-25T11:01:46Z")

</div>

Hello!

I completed my survey form project but for some reason, there is still an error related to the input id and the label id.

If I am not mistaken, the “for” attribute for label should match the id attribute for the input that corresponds with the label correct?

> **[fcc-survey](https://codepen.io/bbs2527/pen/MWpNBaY)**
>
> ...

**Your browser information:**

User Agent is: `Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0`

**Challenge:** Build a Product Landing Page

**Link to the challenge:**

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-projects/build-a-product-landing-page)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![StephanDue](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/stephandue/32/282384_2.png) [@StephanDue](https://forum.freecodecamp.org/u/StephanDue)\
**Post date:** [June 25, 2021, 11:17am UTC](https://forum.freecodecamp.org/t/survey-form-error-assisstance/466497/2 "2021-06-25T11:17:58Z")

</div>

@ bbs2527, when a test fails click the red button to see which test(s) are failing and text to help you correct the issue.

- **Be sure and read more than just the first line of the failing message**. The ability to read and comprehend error messages is a skill you’ll need to acquire as a developer. Ask questions on what you don’t understand.

The failing test message says

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

Check your ids.

---

<div class="post-metadata">

**Author:** ![manjupillai16](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/manjupillai16/32/186013_2.png) [@manjupillai16](https://forum.freecodecamp.org/u/manjupillai16)\
**Post date:** [June 25, 2021, 11:17am UTC](https://forum.freecodecamp.org/t/survey-form-error-assisstance/466497/3 "2021-06-25T11:17:59Z")

</div>

Hi @bbs2527 ,

> If I am not mistaken, the “for” attribute for label should match the id attribute for the input that corresponds with the label correct?

This is correct.

The test is failing coz it’s looking for an id attribute for the labels for Name, email and Age , like below:

```auto
<label id ="name-label" for="name">Name</label>
<input type="text" placeholder="Name" id="name" required>

```

btw, your background image looks great! 👍

---

<div class="post-metadata">

**Author:** ![pawantekade22](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pawantekade22/32/220213_2.png) [@pawantekade22](https://forum.freecodecamp.org/u/pawantekade22)\
**Post date:** [June 25, 2021, 11:59am UTC](https://forum.freecodecamp.org/t/survey-form-error-assisstance/466497/4 "2021-06-25T11:59:10Z")

</div>

**Suggestion**

- Please use Inbuilt CSS and HTML analyzer or use HTML validator [https://validator.w3.org/](https://validator.w3.org/)

**Errors**

1. 

 ![1 error.PNG](https://global.discourse-cdn.com/freecodecamp/original/3X/8/0/80c3a7cd69c291caee9a66ab83fcb854121fde91.jpeg)

1. 

 ![2 error](https://global.discourse-cdn.com/freecodecamp/original/3X/9/0/905f6ea2e5f1f29124ac1d09980f9f3437120053.png)  
**Feedback**

- background image looks great 👌.

happy coding⭐.

---

<div class="post-metadata">

**Author:** ![bbs2527](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bbs2527/32/206143_2.png) [@bbs2527](https://forum.freecodecamp.org/u/bbs2527)\
**Post date:** [June 25, 2021, 12:01pm UTC](https://forum.freecodecamp.org/t/survey-form-error-assisstance/466497/5 "2021-06-25T12:01:13Z")

</div>

I read it but I think I misconstrued what the error was mentioning. I thought it wanted the inputs to have id=“name-label”, id=“email-label”, and id=“number-label” which would have been strange considering it already requested specific ids and the for attribute to the corresponding labels wouldn’t have matched. I went ahead and added the id to the label elements and it seemed to be good error wise now :).

---

<div class="post-metadata">

**Author:** ![bbs2527](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bbs2527/32/206143_2.png) [@bbs2527](https://forum.freecodecamp.org/u/bbs2527)\
**Post date:** [June 25, 2021, 12:03pm UTC](https://forum.freecodecamp.org/t/survey-form-error-assisstance/466497/6 "2021-06-25T12:03:31Z")

</div>

Thanks! That was the issue (for a second I thought it meant add another id to the inputs). Now everything passes 😃

---

<div class="post-metadata">

**Author:** ![bbs2527](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bbs2527/32/206143_2.png) [@bbs2527](https://forum.freecodecamp.org/u/bbs2527)\
**Post date:** [June 25, 2021, 12:06pm UTC](https://forum.freecodecamp.org/t/survey-form-error-assisstance/466497/7 "2021-06-25T12:06:43Z")

</div>

Thanks for the error catches and the suggestion! I made sure to fix them :). Everything should be in working order now :).

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [December 25, 2021, 12:07am UTC](https://forum.freecodecamp.org/t/survey-form-error-assisstance/466497/8 "2021-12-25T00:07:12Z")

</div>

Closed on December 25, 2021, 12:07am UTC

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