# I need help on my test suit template

**URL:** <https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874>\
**Category:** General\
**Created:** [December 29, 2019, 9:48pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874 "2019-12-29T21:48:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jamerson](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@Jamerson](https://forum.freecodecamp.org/u/Jamerson)\
**Post date:** [December 29, 2019, 9:48pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/1 "2019-12-29T21:48:34Z")

</div>

I need help on this step: 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”. Here is a link to my pen [https://codepen.io/Jamescodes/pen/WNbEYVL](https://codepen.io/Jamescodes/pen/WNbEYVL).

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 29, 2019, 9:52pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/3 "2019-12-29T21:52:56Z")

</div>

look at the first line below the failed user story, it will give a clearer reason for which the user story is failing  
for example you need to resolve this:

> `#name-label is not defined`

---

<div class="post-metadata">

**Author:** ![Jamerson](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@Jamerson](https://forum.freecodecamp.org/u/Jamerson)\
**Post date:** [December 29, 2019, 9:54pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/4 "2019-12-29T21:54:08Z")

</div>

It does say label not defined. How can I fix that?

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 29, 2019, 9:54pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/5 "2019-12-29T21:54:35Z")

</div>

do you have an element with that `id`?

---

<div class="post-metadata">

**Author:** ![Jamerson](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@Jamerson](https://forum.freecodecamp.org/u/Jamerson)\
**Post date:** [December 29, 2019, 9:59pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/6 "2019-12-29T21:59:33Z")

</div>

```auto
<label for="name">name:</label>
  <input type="text" id="name" placeholder="Name" required>
  <button type="submit">Submit</button>
  <br></br>
  

<label for="email">email:</label>
  <input type="email" id="email" placeholder="Email" required></input>
<button type="sumbit">Submit</button>
  <br></br>

<label for="number">number:</label>
  <input type="number" id="number" min=1 max=100 placeholder="Age">
<button type="submit">Submit</button>

```

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 29, 2019, 10:02pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/7 "2019-12-29T22:02:49Z")

</div>

the question stay, do you have an element with that `id`? (do you remember what an `id` is?)

---

<div class="post-metadata">

**Author:** ![Jamerson](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@Jamerson](https://forum.freecodecamp.org/u/Jamerson)\
**Post date:** [December 29, 2019, 10:05pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/8 "2019-12-29T22:05:51Z")

</div>

I do know what an id is. I gave my labels names, and I matched them with the ids of the input elements.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 29, 2019, 10:08pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/9 "2019-12-29T22:08:54Z")

</div>

and you did a good job there, but the user story is asking something else: you need to give a specific id to a specific element, and the id you need to use is the required one

---

<div class="post-metadata">

**Author:** ![Jamerson](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@Jamerson](https://forum.freecodecamp.org/u/Jamerson)\
**Post date:** [December 29, 2019, 10:09pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/10 "2019-12-29T22:09:11Z")

</div>

I’m not sure why it says not defined because I gave the labels a for="name"or “email” or “number”. Does this not define them? If not, what does?

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 29, 2019, 10:10pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/11 "2019-12-29T22:10:35Z")

</div>

but have you ever used the required id? you need to use the `#name-label` id

you never used that id, so it say it is not defined

---

<div class="post-metadata">

**Author:** ![Jamerson](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@Jamerson](https://forum.freecodecamp.org/u/Jamerson)\
**Post date:** [December 29, 2019, 10:11pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/12 "2019-12-29T22:11:38Z")

</div>

Would that id be: id=“name-label”, id=“email-label”, and id=“number-label”?

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 29, 2019, 10:14pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/13 "2019-12-29T22:14:30Z")

</div>

well, that is what the user story say…

> **User Story #10:** 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"` .

---

<div class="post-metadata">

**Author:** ![Jamerson](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@Jamerson](https://forum.freecodecamp.org/u/Jamerson)\
**Post date:** [December 29, 2019, 10:15pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/14 "2019-12-29T22:15:16Z")

</div>

So… I need to include the #name-label id in the label?

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 29, 2019, 10:17pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/15 "2019-12-29T22:17:17Z")

</div>

try to do it, see what happens

---

<div class="post-metadata">

**Author:** ![Jamerson](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@Jamerson](https://forum.freecodecamp.org/u/Jamerson)\
**Post date:** [December 29, 2019, 10:20pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/16 "2019-12-29T22:20:37Z")

</div>

```auto
<label for="name-label">name:</label>
  <input type="text" id="name-label" placeholder="Name" required>
  <button type="submit">Submit</button>
  <br></br>

```

---

<div class="post-metadata">

**Author:** ![Jamerson](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@Jamerson](https://forum.freecodecamp.org/u/Jamerson)\
**Post date:** [December 29, 2019, 10:21pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/17 "2019-12-29T22:21:42Z")

</div>

I did this. I’m not sure if I’m just not understanding something or what, but now I only pass 4/17 of the tests.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 29, 2019, 10:22pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/18 "2019-12-29T22:22:41Z")

</div>

> [@ILM](#):
>
> corresponding labels that describe the purpose of each field with the following ids

it doesn’t seem you have given an `id` to the `label` element

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 29, 2019, 10:25pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/19 "2019-12-29T22:25:19Z")

</div>

> [@Jamerson](#):
>
> I need to include the #name-label id in the label?

why didn’t you do what you said?

---

<div class="post-metadata">

**Author:** ![Jamerson](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@Jamerson](https://forum.freecodecamp.org/u/Jamerson)\
**Post date:** [December 29, 2019, 10:29pm UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/20 "2019-12-29T22:29:24Z")

</div>

I figured it out. I was a little confused between the for and the id. Thank you for your time!

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 16, 2021, 11:28am UTC](https://forum.freecodecamp.org/t/i-need-help-on-my-test-suit-template/336874/21 "2021-01-16T11:28:56Z")

</div>

Closed on January 16, 2021, 11:28am UTC


