generated from CodeYourFuture/Module-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 428
London | 26-ITP-Jan | Alex Okorefe | Sprint 2 | Form controls #1128
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
Alex-Os-Dev-Lab
wants to merge
7
commits into
CodeYourFuture:main
Choose a base branch
from
Alex-Os-Dev-Lab:feature/form-control
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+129
−7
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fcc7fdf
added customer name and validation to index.html
Alex-Os-Dev-Lab 66337da
Email validation and notes added to index.html
Alex-Os-Dev-Lab 570f4da
Included t-shirt selection options to form
Alex-Os-Dev-Lab 6b52590
Updated customer instructions for required fields
Alex-Os-Dev-Lab 6866b17
Improved spacing between customer name and email inputs to improve li…
Alex-Os-Dev-Lab 04382c1
Refactor form structure and improve accessibility by updating descrip…
Alex-Os-Dev-Lab 5cb5d7d
footer tag changed, required in parenthesis for each required field, …
Alex-Os-Dev-Lab File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,149 @@ | ||
| <!DOCTYPE html> | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
| <title>My form exercise</title> | ||
| <meta name="description" content="" /> | ||
| <meta | ||
| name="description" | ||
| content="A form to collect customer information and t-shirt preferences." | ||
| /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
|
|
||
| <!-- Requirements: | ||
| - Collect a valid customer name (min 2 characters) | ||
| - Collect a valid customer email (must be a valid email address) | ||
| - Collect a t-shirt colour (must be 1 of 3 colours) | ||
| - Collect a t-shirt size (must be one of: XS, S, M, L, XL, XXL) | ||
| - All fields are required | ||
| - HTML only (no CSS / JavaScript) | ||
| - Do not write a form action for this project. --> | ||
| </head> | ||
| <body> | ||
| <header> | ||
| <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--> | ||
| <section> | ||
| <h2>Customer Information:</h2> | ||
| <p>Please fill in your details below: <br /></p> | ||
|
|
||
| <!-- | ||
| Customer name collection: | ||
| - min 2 characters for validation | ||
| - field is required | ||
| - placeholder text example provided | ||
| --> | ||
| <div> | ||
| <label for="CustomerFullName" | ||
| ><em>(required)</em>Customer's Full Name:</label | ||
| > | ||
| <input | ||
| type="text" | ||
| id="CustomerFullName" | ||
| name="CustomerFullName" | ||
| placeholder="e.g. John Smith" | ||
| required | ||
| minlength="2" | ||
| /> | ||
| </div> | ||
| <br /> | ||
|
|
||
| <!-- Customer email collection: | ||
| - type = "email" for validation | ||
| - field is required | ||
| - placeholder text example provided | ||
| --> | ||
|
|
||
| <div> | ||
| <label for="CustomerEmail" | ||
| ><em>(required)</em>Customer's Email:</label | ||
| > | ||
| <input | ||
| type="email" | ||
| id="CustomerEmail" | ||
| name="CustomerEmail" | ||
| placeholder="e.g. john@example.com" | ||
| required | ||
| /> | ||
| </div> | ||
| <br /> | ||
| </section> | ||
|
|
||
| <section> | ||
| <h2>T-Shirt Selection:</h2> | ||
|
|
||
| <p>Select your preferred T-shirt colour and size:</p> | ||
|
|
||
| <!-- T-Shirt Colour Selection: | ||
| - type = "radio" for selection mandatory one choice | ||
| - field is required | ||
| --> | ||
|
|
||
| <div> | ||
| <fieldset> | ||
| <legend><em>(required)</em>T-Shirt Colour:</legend> | ||
| <input | ||
| type="radio" | ||
| id="ColourRed" | ||
| name="T-ShirtColourSelection" | ||
| value="Red" | ||
| required | ||
| /> | ||
| <label for="ColourRed">Red</label> | ||
|
|
||
| <input | ||
| type="radio" | ||
| id="ColourBlue" | ||
| name="T-ShirtColourSelection" | ||
| value="Blue" | ||
| required | ||
| /> | ||
| <label for="ColourBlue">Blue</label> | ||
|
|
||
| <input | ||
| type="radio" | ||
| id="ColourGreen" | ||
| name="T-ShirtColourSelection" | ||
| value="Green" | ||
| required | ||
| /> | ||
| <label for="ColourGreen">Green</label> | ||
| </fieldset> | ||
| </div> | ||
|
|
||
| <!-- T-Shirt Size Selection: | ||
| - dropdown select for size options | ||
| - field is required | ||
| --> | ||
|
|
||
| <div> | ||
| <fieldset> | ||
| <legend><em>(required)</em>T-Shirt Size:</legend> | ||
| <label for="TShirtSize">Select Size:</label> | ||
| <select id="TShirtSize" name="TShirtSize" required> | ||
| <option value="">-- 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> | ||
| </fieldset> | ||
| </div> | ||
|
|
||
| <div> | ||
| <br /> | ||
| <button type="submit">Submit</button> | ||
| </div> | ||
| </section> | ||
| </form> | ||
| </main> | ||
| <footer> | ||
| <!-- change to your name--> | ||
| <h2>By HOMEWORK SOLUTION</h2> | ||
| <p>By ALEX OKOREFE</p> | ||
| </footer> | ||
| </body> | ||
| </html> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
For a form to be submitted, even though we aren't using JavaScript. Do you think a button is missing at the end used to submit a form. Let me know your thoughts on this, or what you think you can add to improve it.