-
-
Notifications
You must be signed in to change notification settings - Fork 457
Glasgow | ITP-MAY-2026 | Tuan Nguyen | Sprint 1 | Form control #1214
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 all commits
e8bbf03
6ab6dd5
2b6606d
ee353eb
e6ac02a
5e42f93
7b5e8cc
8d1277c
205ba3b
9c5a249
7ec34c7
978ad11
9d9847f
ba8b66c
42ec49d
3692bcb
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,7 +3,7 @@ | |
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
| <title>My form exercise</title> | ||
| <title>Glasgow style product form</title> | ||
| <meta name="description" content="" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| </head> | ||
|
|
@@ -13,13 +13,44 @@ <h1>Product 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">Customer name:</label> | ||
| <input type="text" id="name" name="name" required placeholder="john smith"> | ||
| </div> | ||
| <br> | ||
| <div> | ||
| <label for="email">Customer email:</label> | ||
| <input type="email" id="email" name="email" required placeholder="example123@gmail.com"> | ||
| </div> | ||
| <br> | ||
| <fieldset> | ||
|
Contributor
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. Good use of fieldset |
||
| <legend>Pick a color of your choosing</legend> | ||
| <input type="radio" id="color-red" name="color" value="red" required> | ||
| <label for="color-red">Red</label> | ||
| <input type="radio" id="color-blue" name="color" value="blue" required> | ||
|
Contributor
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. A additional thought:
Author
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. Thank you for your feed back, I understand that is way of writing the code can send hard to understand data I will make correct change and message you back. |
||
| <label for="color-blue">Blue</label> | ||
| <input type="radio" id="color-green" name="color" value="green" required> | ||
| <label for="color-green">Green</label> | ||
|
Comment on lines
+28
to
+33
Contributor
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. As an extension on this - it's worth thinking about how we communicate information as easily as possible. When selecting colours, it's nice to also see the colour associated. One way to improve this more is to add a colour to the radio buttons here
Author
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. Thank you for your feed back, I will make this change and message you back when it done |
||
| </fieldset> | ||
| <div> | ||
| <br> | ||
| <label for="size">Shirt size</label> | ||
| <select id="size" name="shirt size" required> | ||
|
Contributor
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. Here you've demonstrated a good naming choice in the "name" tag, using "shirt size" describes this data accurately |
||
| <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> | ||
|
Comment on lines
+37
to
+45
Contributor
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. Could wrap this in a fieldset tag too
Author
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. Thank you for the feed back, I will see which tags I can wrap this around and make change |
||
| </div> | ||
| <br> | ||
| <button type="submit">Submit</button> | ||
|
Contributor
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. Demonstrates good practice by adding submit button |
||
| </form> | ||
| </main> | ||
| <hr> | ||
| <footer> | ||
| <p><strong>By Tuan Nguyen</strong></p> | ||
| <!-- change to your name--> | ||
| <p>By HOMEWORK SOLUTION</p> | ||
| </footer> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
A valid name is meant to have at least two characters or more. At the moment I can submit a name of "P" which doesn't follow our rules but is allowed by the form. Can you add validation to only allow 2 or more characters?
And can you communicate that rule if someone doesn't follow it?
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.
Thank for you for your feed back I will make the validation change and message you back