Skip to content
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 46 additions & 6 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,59 @@
</head>
<body>
<header>
<h1>Product Pick</h1>
<h1>Pick product</h1>
</header>
<main>
<form>
<!-- write your html here-->
<!--
try writing out the requirements first as comments
this will also help you fill in your PR message later-->

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

</div>
<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.

</div>
<br>
<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.

<option value="grey" >Grey</option>
<option value="black">Black</option>
<option value="red"> Red</option>
</select>
</div>
<br>
<div>

<!--What size does the customer want? I must provide the following 6 options: XS, S, M, L, XL, XXL -->
<label for="size">Size</label>
<select name="differentsize" id="size">
<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>
</div>
<br>
<div>
<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.

<div>
<input id="reset" type="reset">
</div>
</form>
</main>
<footer>
<!-- change to your name-->

@abdishakoor-dev abdishakoor-dev Sep 16, 2026 •

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.

There is no need for this comment line, it can be removed.

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

</footer>
</body>
</html>
Loading