-
-
Notifications
You must be signed in to change notification settings - Fork 501
Cape Town | 26-ITP-May | Juanita Nwachukwu | Sprint 1 | Form Controls #1401
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
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 |
|---|---|---|
|
|
@@ -8,20 +8,85 @@ | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| </head> | ||
| <body> | ||
| <header> | ||
| <h1>Product Pick</h1> | ||
| <header>T-shirt Order Form | ||
| <h1>T-shirt Order Form</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--> | ||
| </form> | ||
| </main> | ||
| <footer> | ||
| <!-- Name --> | ||
| <label for="name">Full Name</label> | ||
| <input | ||
| type="text" | ||
| id="name" | ||
| required | ||
| minlength="5" | ||
| > | ||
|
Comment on lines
+17
to
+23
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. This input element does not yet fully meet the requirement:
Currently, string such as "CJ" would be rejected but a string containing exactly 5 space characters would be accepted. On separate note, can you use an AI to find out "In HTML, what is a |
||
|
|
||
| <!--EMAIL ADDRESS" --> | ||
| <label for="email">Email Address</label> | ||
| <input | ||
| type="email" | ||
| id="email" | ||
| name="email" | ||
| required | ||
| > | ||
|
|
||
| <!-- COLOUR --> | ||
| <p>Choose a colour:</p> | ||
|
|
||
| <label> | ||
| <input type="radio" name="colour" value="pink" required> | ||
| Pink | ||
| </label> | ||
|
|
||
| <label> | ||
| <input type="radio" name="colour" value="black" required> | ||
| Black | ||
| </label> | ||
|
|
||
| <label> | ||
| <input type="radio" name="colour" value="blue" required> | ||
| Blue | ||
| </label> | ||
|
Comment on lines
+37
to
+50
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. Note: For radio buttons within the same group, it is sufficient to mark only one of them as |
||
|
|
||
| <!-- SIZE --> | ||
| <label for="size">SIZE</label> | ||
| <select id="size" name="size" required> | ||
| <option value="">-- Select Size --</option> | ||
| <option value="XS">XS</option> | ||
|
Comment on lines
+52
to
+56
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. The layout of the colour and size controls feels a bit unbalanced. The colour options are presented as a radio group, while the size selector appears immediately afterward without a similar grouping structure. Consider reorganizing these controls (for example, using
|
||
| <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> | ||
|
|
||
| <!-- | ||
| FORM REQUIREMENTS: | ||
| 1. Collect customer's full name | ||
| - Must be at least 2 characters long | ||
| - Cannot be empty | ||
|
|
||
| 2. Collect customer's email | ||
| - Must be a valid email format | ||
| - Field is required | ||
|
|
||
| 3. Choose T-shirt colour | ||
| - Must select ONE option only | ||
| - Only 3 allowed options provided | ||
| - Cannot enter custom colours | ||
|
|
||
| 4. Choose T-shirt size | ||
| - Must select ONE option | ||
| - Options: XS, S, M, L, XL, XXL | ||
| - Field is required | ||
|
|
||
| 5. All fields are required before submission | ||
|
|
||
| 6. No JavaScript allowed... only HTML form validation | ||
| --> | ||
| <!-- change to your name--> | ||
| <p>By HOMEWORK SOLUTION</p> | ||
| <p>By Juanita Nwachukwu</p> | ||
| </footer> | ||
| </body> | ||
| </html> | ||
| </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.
Why made "T-shirt Order Form" to appear twice?