Build a Survey Form - Confusing User Stories

Build a Survey Form - Confusing User Stories
0.0 0

#1

User Story #4: Inside the form element, I am required to enter my name in a field with id=“name”.
User Story #5: Inside the form element, I am required to enter an email in a field with id=“email”.
User Story #7: Inside the form, I can enter a number in a field with id=“number”.

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

The tester is apparently down, so I can’t just test it out and see which works, but aren’t these telling me to label the input fields with two different IDs?

https://learn.freecodecamp.org/responsive-web-design/responsive-web-design-projects/build-a-survey-form


#2

well i think its kind of …

I think by giving them 2 ids at different places u have more control over styling the each specific element.


#3

If you use a class and an ID, sure. But this is pretty clearly telling us to use two different IDs, and I’m not even sure that’s possible in HTML. I know it’s bad practice, either way.


#4

one set is an ID for the input fields. The other set is an ID for the labels for those fields. ( Seems unnecessarily over marked up to me. )


#5

yup it looks its unnecessary …
but don’t know about whether it is bad practice or not.


#6

It would be bad practice if you used an ID on a recurring component such as an item in a list where the ID would not be unique. In this context it’s fine because the form is an isolated resource. That’s how I see it. Though it most certainly is overkill concerning the markup.


#7

I think I get it now. What it’s asking for is for us to wrap the text in front of the input field, like “Name:” in a label that corresponds to its field:

<label for="name" id="name-label">Name:</label>
<input type="text"  id="name" value="name" placeholder="Enter your name." required><br>

That makes sense, but it could probably be written more clearly in the user story.

Unless I’m wrong, in which case I’m back to being confused. Thanks for the help, everyone.