Skip to content

London | 26-ITP- Sept | Chandramani Gaire | Sprint 1 | Forms Controls - #1507

Open
gaireprakash20-ops wants to merge 13 commits into
CodeYourFuture:mainfrom
gaireprakash20-ops:Form-Controls
Open

gaireprakash20-ops wants to merge 13 commits into
CodeYourFuture:mainfrom
gaireprakash20-ops:Form-Controls

Conversation

@gaireprakash20-ops

Copy link
Copy Markdown

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

Task code

CYF-1004

Changelist

I changed the HTML and made it according to the task requirements, as per the CYF assignment.

@netlify

netlify Bot commented Sep 12, 2026

Copy link
Copy Markdown

Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit 3bc4ca6
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/6aa9c08e7d96de00095927e8
😎 Deploy Preview https://deploy-preview-1507--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: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 86 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

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

@gaireprakash20-ops gaireprakash20-ops added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 1 Assigned during Sprint 1 of this module labels Sep 12, 2026

@abdishakoor-dev abdishakoor-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good structure, with a label on every field and a submit button. Things to sort before it can be marked Complete:

  1. Name validation rejects valid names. On the deploy preview, type Al or Är as the name and submit. Both are refused, and the task says two non-space characters is enough. See line 20.
  2. Reload the page and press Submit without touching either dropdown. It goes through with Grey and XS, which the customer never chose. The task says all fields are required. See line 31.
  3. There's a stray </div> on line 56. It's the one error the HTML validator from the README checklist (https://validator.w3.org/) reports, and Prettier can't parse the file because of it.
  4. Formatting. Once line 56 is fixed, run npx prettier --write Form-Controls from the repo root and push.

Add the Needs Review label again once you've pushed.

Comment thread Form-Controls/index.html Outdated
<!-- 1. What is the customer's name? I must collect this data and ensure it contains at least two non-space characters.-->
<div>
<label for="name">Name</label>
<input type="text" id="name" placeholder="Chandrmani Gaire" pattern=".*\S.*\S." required>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Compare this pattern with the one in the README character by character. The last part is different. What does a . on its own match, and how many characters does it require after the second non-space one?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

type name=.\S.\S.* here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed. A is rejected and AB goes through now.

Comment thread Form-Controls/index.html Outdated
<div>
<!--What colour should this T-shirt be? I must provide 3 options. How will I ensure they do not choose other colours? -->
<label for="coloroption">Color option</label>
<select id="coloroption" name="Color">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This select has no required, and because the first option is a real colour it's already "chosen" when the page loads. What would you add so the customer has to make a choice? Same for the size select on line 42. The MDN form validation page from the prep covers this.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

put

on this section

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Both dropdowns fixed. Good.

Comment thread Form-Controls/index.html Outdated
<input id="submit" type="submit">
</div>
<br>
</div>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Which <div> is this closing? Count the opening and closing divs above it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

clear the

like this

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed, validator is clean.

Comment thread Form-Controls/index.html Outdated
<br>
<div>
<label for="email">Email</label>
<input type="email" placeholder="chandramani@gmail.com" id="email" required>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The two selects have a name attribute but the name and email inputs don't. What does name do when a form is submitted? Try submitting and look at the address bar.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

change the name="email"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Done.

Comment thread Form-Controls/index.html Outdated
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
<p> By Chandramani Gaire</p>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Extra spaces before "By" and between your first and last name, and the starter comment on line 63 can go now.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

change the space

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Spaces fixed. The starter comment on line 62 is still there, see the main comment.

@abdishakoor-dev abdishakoor-dev 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 Sep 14, 2026
@netlify

netlify Bot commented Sep 14, 2026

Copy link
Copy Markdown

A new user left a comment. This user must be approved by a Netlify team owner before comments can be displayed.

Approve this user

1 similar comment
@netlify

netlify Bot commented Sep 14, 2026

Copy link
Copy Markdown

A new user left a comment. This user must be approved by a Netlify team owner before comments can be displayed.

Approve this user

@gaireprakash20-ops gaireprakash20-ops added 🐋 Size X-Large 8-16 hours 📅 Sprint 1 Assigned during Sprint 1 of this module 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. and removed 📅 Sprint 1 Assigned during Sprint 1 of this module 🐋 Size X-Large 8-16 hours Reviewed Volunteer to add when completing a review with trainee action still to take. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Sep 15, 2026
@gaireprakash20-ops gaireprakash20-ops removed the Reviewed Volunteer to add when completing a review with trainee action still to take. label Sep 15, 2026

@abdishakoor-dev abdishakoor-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The name check, both dropdowns and the stray div are all fixed, and the validator is clean. One thing left before I mark this Complete: the formatting check, which was point 4 last time.

"My code is consistently formatted" is on the README checklist, and the tool that does it for you is called Prettier. It rearranges spacing and indentation to one agreed style, so that your code is easy to read and so that a reviewer only sees the changes you meant to make, not stray spaces and tabs. At the moment index.html fails that check; the indentation wanders between lines 16 and 58.

Prettier comes with the CYF extension pack you were asked to install during onboarding. If you're not sure you have it, open VS Code, go to Extensions, and search for CodeYourFuture Extension Pack; install it if it isn't there: https://marketplace.visualstudio.com/items?itemName=CodeYourFuture.cyf-extension-pack

Then open index.html, right click in the editor, choose Format Document, and pick Prettier if VS Code asks which formatter to use. Save, commit the changes it makes, and push. The starter comment on line 62 can go in the same commit. To make this happen automatically every time you save, follow the format on save steps here: https://github.com/CodeYourFuture/Module-JavaScript-Fundamentals/blob/main/practical_guide.md

Thanks for sorting the label. Same again once you've pushed: add Needs Review and I'll pick it up.

@abdishakoor-dev abdishakoor-dev 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 Sep 15, 2026
@gaireprakash20-ops

Copy link
Copy Markdown
Author

thanks

@gaireprakash20-ops gaireprakash20-ops added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants