Skip to content

Sheffield | 26-ITP-Jan | Seti Mussa | Sprint 2 | Form-Control #1160

Open
Seti-Jemal wants to merge 8 commits intoCodeYourFuture:mainfrom
Seti-Jemal:feature/form-controls
Open

Sheffield | 26-ITP-Jan | Seti Mussa | Sprint 2 | Form-Control #1160
Seti-Jemal wants to merge 8 commits intoCodeYourFuture:mainfrom
Seti-Jemal:feature/form-controls

Conversation

@Seti-Jemal
Copy link

@Seti-Jemal Seti-Jemal commented Feb 7, 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 included three colour options and six size to give user more choices. I also added name and email filed so customer can enter their information.

@netlify
Copy link

netlify bot commented Feb 7, 2026

Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit c095254
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/698de33267a0dc0008f6bc3d
😎 Deploy Preview https://deploy-preview-1160--cyf-onboarding-module.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
2 paths audited
Performance: 96 (🔴 down 4 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 91 (🟢 up 5 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@Seti-Jemal Seti-Jemal added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 2 Assigned during Sprint 2 of this module labels Feb 7, 2026
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this file for? If it is not a required file in implementing the T-shirt order form, you should delete it to keep the PR branch clean.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I deleted the file , the form control stopped working as well.

Comment on lines 48 to 60
<fieldset>
<legend>Please select a size:</legend>
<label for="size">Size</label>
<select name="size" id="size" required>
<option value="">Select size</option>
<option value="xs">XS</option>
<option value="s">S</option>
<option value="m">M</option>
<option value="l">L</option>
<option value="xl">XL</option>
<option value="xxl">XXL</option>
</select>
</fieldset>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you improve the indentation of the code on this file?

<form action="results.html" method="GET" autocomplete="on">
<div>
<label for="name">Name</label>
<input type="text" name="name" id="name" minlength="2" required autocomplete="name">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently a user can enter a name consisting of only space characters (e.g., " "). Can you enforce a stricter validation rule using the pattern attribute to disallow any name that contains only space characters?

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Feb 8, 2026
@Seti-Jemal
Copy link
Author

Hi Cjyuna , I fixed it .

@cjyuan
Copy link
Contributor

cjyuan commented Feb 9, 2026

If you have made any changes, you need to push them to GitHub too. (Currently I don't see any new commits on this PR branch.)

I am guessing you are still working on your PR. If it is ready to be re-reviewed, don't forget to add the "Needs Review" label.

</form>
<main>
<h1>Order Form</h1>
<form action="results.html" method="GET" autocomplete="on">
Copy link
Contributor

@cjyuan cjyuan Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For testing, you can set the action attribute to "#" so that the form data is sent to the same URL.
There is no need to prepare a separate file to accept the submitted data. This way, you don't need to introduce result.html in this repo.

Note: The spec actually says, Do not write a form action for this project.

<form action="results.html" method="GET" autocomplete="on">
<div>
<label for="name">Name</label>
<input type="text" name="name" id="name" minlength="2" required pattern=".*/S*." title="Name must contain at least one non-space character" autocomplete="name">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern value is not quite correct. Now the input field would not accept name like "John".

Comment on lines 26 to 41
<fieldset>
<legend>Please select a color:</legend>
<div>
<input type="radio" id="black" name="color" value="Black" required>
<label for ="black"> Black</label>
</div>
<br>
<div>
<input type="radio" id="grey" name="color" value="Grey">
<label for ="grey"> Grey</label>
<br>
</div>
<div>
<br>
<input type="radio" id="red" name="color" value="Red">
<label for ="red"> Red</label>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you improve the indentation of the code on this file?

VSCode's "Format Document" feature can help us format our code for better readability and consistency.
To use the feature, right-click inside the code editor and select the option.

@Seti-Jemal Seti-Jemal added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 12, 2026
@cjyuan
Copy link
Contributor

cjyuan commented Feb 12, 2026

Changes look good. Well done.

Do you still need result.html in this repo for your form to work? If not, you should delete it to keep the branch clean.

I will mark this PR as "Complete" first.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants