Skip to content

ITP-2026-1 | Michael English | Week 2 | Form Controls#92

Closed
Eigo-G wants to merge 7 commits into
HackYourFutureBelgium:mainfrom
Eigo-G:form-controls-wk2
Closed

ITP-2026-1 | Michael English | Week 2 | Form Controls#92
Eigo-G wants to merge 7 commits into
HackYourFutureBelgium:mainfrom
Eigo-G:form-controls-wk2

Conversation

@Eigo-G
Copy link
Copy Markdown

@Eigo-G Eigo-G commented Mar 2, 2026

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • [?] I have tested my changes
  • My changes follow the style guide

Changelist

  • I Need to make commits regularly during the process, for some reason I wait until the end and run into staging issues and commit isn't detailed enough.
  • My form is semantic html
  • All inputs have associated labels
  • I require a valid name. I have defined a valid name as a text string of two characters or more.
  • I require a valid email.
  • I require one colour from a defined set of 3 colours.
  • I require one size from a defined set of 6 sizes.

Questions

I'm still having trouble testing with Lighthouse on preview live server from Visual Studio Code.

@Eigo-G Eigo-G linked an issue Mar 2, 2026 that may be closed by this pull request
@talmurshidi talmurshidi self-requested a review March 7, 2026 10:00
@talmurshidi
Copy link
Copy Markdown
Member

@Eigo-G ,Nice start --- you built a working form structure, but this submission does not match the assignment yet. The main issue is scope: you added many fields that were not requested.

What You Did Well

  • You used native HTML form controls with required validation.

  • Size is constrained to the 6 required options.

Fix / Improve

1. Remove fields that are out of scope

The assignment only asks for:

  • customer name

  • customer email

  • t-shirt colour

  • t-shirt size

You should remove:

  • First Name / Last Name split

  • Street Address & House Number

  • City

  • Postcode

  • Phone Number

  • Quantity

The instructions explicitly say the customer already has an account, so address and charging details are already known.

2. Name field does not match the requirement

The task asks for the customer's name as one field, not separate first and last name fields.

Use one input, for example:

<div>
  <label for="name">Name</label>
  <input type="text" id="name" name="name" required minlength="2" />
</div>

3. Colour options are wrong

The requirement says:

  • exactly 3 options

  • from a defined set

  • user must not be able to choose other colours

You currently have 5 colour options. Reduce this to 3 only.

Also, for this assignment, radio buttons are better for colours. select can work, but radio is clearer when there are only 3 choices.

4. Missing semantic grouping with fieldset and legend

You did not use fieldset and legend to group related form controls.

For this assignment, that matters especially for the colour options. A radio group should be wrapped in a fieldset with a meaningful legend, for example:

<fieldset>
  <legend>Choose a colour</legend>

  <div>
    <input type="radio" id="red" name="colour" value="red" required />
    <label for="red">Red</label>
  </div>

  <div>
    <input type="radio" id="blue" name="colour" value="blue" />
    <label for="blue">Blue</label>
  </div>

  <div>
    <input type="radio" id="green" name="colour" value="green" />
    <label for="green">Green</label>
  </div>
</fieldset>

This is better semantically and for accessibility.

5. Add proper id + for associations

You wrapped inputs inside labels, which is valid, but for beginner clarity and maintainability it is better to use:

  • label for="..."

  • matching input id="..."

That makes association explicit.

6. Invalid HTML structure

You have extra closing </div> tags near the bottom. Your nesting is broken.

Use https://validator.w3.org/#validate_by_input:

  1. paste the full HTML

  2. fix all reported errors

  3. validate again until you get 0 errors

Also run Format Document in VS Code after fixing the structure.

Unrelated files in PR

You included:

  • Form-Controls/README.md

  • Module-Onboarding

These are not part of the assignment and should be removed from the PR.

If the file already exists in main and was edited by mistake

Restore it from main:

git fetch origin
git restore --source=origin/main -- Form-Controls/README.md
git commit -m "Revert unrelated README.md file changes"
git push

If a completely new unrelated file was added

Remove it from the branch:

git rm ../Module-Onboarding
git commit -m "Remove unrelated file"
git push

The PR updates automatically. No new PR is needed.

Commits feedback

Your commit messages are too vague:

  • changed text <h1>

  • checked off completed tasks

Use clearer commit messages like:

  • Update page heading

  • Add form fields for name and email

  • Add size select field

  • Add colour options

  • Fix HTML validation errors

This needs a revision before it meets the assignment:

  • reduce the form to the required 4 data points

  • use one name field

  • reduce colour choices to 3

  • add semantic grouping with fieldset and legend

  • fix invalid HTML with the validator

  • remove unrelated files from the PR

@Eigo-G
Copy link
Copy Markdown
Author

Eigo-G commented Mar 7, 2026 via email

Eigo-G added 4 commits March 7, 2026 14:35
-Simplified Name Label
-Changed the amount of colors in the color input to 3 and changed to radio buttons
-Added missing semantic grouping elements (fieldsets and legends)
-Added proper ids and for attributes to connect labels to their respective inputs
*used appropriate label inputs as directed by the task
*added semantic grouping with fieldset and legend.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

05 - Form Controls

3 participants