-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
base: main
Are you sure you want to change the base?
Changes from 4 commits
59e2534
51c8fbc
b220fdf
81b77c4
1923960
10b2fbb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,25 +3,100 @@ | |
<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 /> | ||
</div> | ||
<br /> | ||
<div> | ||
<label for="email">Email</label> | ||
<input type="email" name="email" id="email" required /> | ||
</div> | ||
<br /> | ||
<fieldset> | ||
<legend>Color</legend> | ||
<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> | ||
</fieldset> | ||
<br /> | ||
<fieldset> | ||
<legend>Size</legend> | ||
<br /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
<div> | ||
<label for="XS">XS</label> | ||
<input type="radio" name="Size" id="XS" value="XS" required /> | ||
</div> | ||
<br /> | ||
<div> | ||
<label for="S">S</label> | ||
<input type="radio" name="Size" id="S" value="S" required /> | ||
</div> | ||
<br /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you find out from ChatGPT, "when to use radio buttons and when to use a dropdown list?" You don't have to change your implementation in this exercise. |
||
<div> | ||
<label for="M">M</label> | ||
<input type="radio" name="Size" id="M" value="M" required /> | ||
</div> | ||
<br /> | ||
<div> | ||
<label for="L">L</label> | ||
<input type="radio" name="Size" id="L" value="L" required /> | ||
</div> | ||
<br /> | ||
<div> | ||
<label for="XL">XL</label> | ||
<input type="radio" name="Size" id="XL" value="XL" required /> | ||
</div> | ||
<br /> | ||
<div> | ||
<label for="XXL">XXL</label> | ||
<input type="radio" name="Size" id="XXL" value="XXL" required /> | ||
</div> | ||
</fieldset> | ||
<br /> | ||
|
||
<div> | ||
<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> |
There was a problem hiding this comment.
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?