Skip to content

GLASGOW | MAY_2025 | MOHAMMED HUSSEIN | FORM CONTROL #659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all 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
72 changes: 63 additions & 9 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,79 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My form exercise</title>
<meta name="description" content="" />
<title>T-Shirt Selection Form</title>
<meta name="description" content="
t-shirt form " />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>

<body>
<header>
<h1>Product Pick</h1>
<h1>T-SHIRT PICK</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-->
<div>
<label for="name">Name</label>
<input type="text" name="name" id="name" minlength="2" required />
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?

</div>
<br />
<div>
<label for="email">Email</label>
<input type="email" name="email" id="email" required />
</div>
<br />
<fieldset>
<legend>Color</legend>
<br />
<div>
<label for="green">Green</label>
<input
type="radio"
name="Color"
id="green"
value="green"
required
/>
</div>
<br />
<div>
<label for="red">Red</label>
<input type="radio" name="Color" id="red" value="red" required />
</div>
<br />
<div>
<label for="yellow">Yellow</label>
<input
type="radio"
name="Color"
id="yellow"
value="yellow"
required
</div>
<br />
</fieldset>
<legend></legend>
<br />
<label for="size">Size</label>
<select name="size" id="size" required>
<option value="" disabled selected>Select your 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>

<div>
<br />
<button type="submit">Submit</button>
</div>
</form>
</main>
<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>
<h2>By Mohammed Hussein</h2>
</footer>
</body>
</html>