-
-
Notifications
You must be signed in to change notification settings - Fork 440
Sheffield | 26-ITP-January | Martha Ogunbiyi | Sprint 2 | Form Controls #978
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
Closed
Closed
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
08b4a39
feature: add labels for customer details, (name and email) with stric…
marthak1 a38961d
feature: add label to select T-Shirt colour
marthak1 102f4f9
feature: add labels for T-shirt sizes
marthak1 0ad8180
refactor: wrap labels for customer details in div instead of using br…
marthak1 8cc8095
refactor: add a default prompt option for colour selection -this make…
marthak1 a1812a5
feature: add a submit button -refactored colour selector to enable ac…
marthak1 33e0cbb
refactor: removed checked from size selector and replaced with requir…
marthak1 65ea9f7
refactor: refactor with minor improvement for accessibility & clarity
marthak1 20dbfec
refactor: refactored to improve accessibility -applied regex pattern …
marthak1 1a00ba2
update: updated regext pattern
marthak1 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,76 @@ | ||
| <!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="viewport" content="width=device-width, initial-scale=1" /> | ||
| </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--> | ||
| </form> | ||
| </main> | ||
| <footer> | ||
| <!-- change to your name--> | ||
| <h2>By HOMEWORK SOLUTION</h2> | ||
| </footer> | ||
| </body> | ||
| </html> | ||
|
|
||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
| <title>My form exercise</title> | ||
| <meta name="description" content="A project demonstrating webform controls" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| </head> | ||
|
|
||
| <body> | ||
| <header> | ||
| <h1>Product Pick</h1> | ||
| </header> | ||
| <main> | ||
| <form> | ||
| <fieldset> | ||
| <legend>Customer Details</legend> | ||
| <div> | ||
| <label for="name">Name: </label> | ||
| <input type="text" id="name" name="name" minlength="3" maxlength="15" autocomplete="name" | ||
| placeholder="enter your name" required> | ||
| </div> | ||
| <div> | ||
| <label for="email">Email: </label> | ||
| <input type="email" id="email" name="email" autocomplete="email" placeholder="enter your email" | ||
| pattern="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$" required> | ||
|
cjyuan marked this conversation as resolved.
Outdated
|
||
| </div> | ||
| </fieldset> | ||
| <fieldset> | ||
| <legend>T-Shirt Color Preference</legend> | ||
| <label for="colour">Select a Colour</label> | ||
| <select id="colour" name="colour" required> | ||
| <option value="" disabled selected hidden>-- Select a Colour --</option> | ||
| <option value="Red">Red</option> | ||
| <option value="Green">Green</option> | ||
| <option value="Blue">Blue</option> | ||
| </select> | ||
| </fieldset> | ||
| <fieldset> | ||
| <legend>Choose Your T-Shirt Size</legend> | ||
| <label for="XS"> | ||
| <input type="radio" id="XS" name="size" value="XS" required> | ||
| XS | ||
| </label> | ||
| <label for="S"> | ||
| <input type="radio" id="S" name="size" value="S"> | ||
| S | ||
| </label> | ||
| <label for="M"> | ||
| <input type="radio" id="M" name="size" value="M"> | ||
| M | ||
| </label> | ||
| <label for="L"> | ||
| <input type="radio" id="L" name="size" value="L"> | ||
| L | ||
| </label> | ||
| <label for="XL"> | ||
| <input type="radio" id="XL" name="size" value="XL"> | ||
| XL | ||
| </label> | ||
| <label for="XXL"> | ||
| <input type="radio" id="XXL" name="size" value="XXL"> | ||
| XXL | ||
| </label> | ||
| </fieldset> | ||
| <button type="submit">Submit</button> | ||
| </form> | ||
| </main> | ||
| <footer> | ||
| <h2>By Martha Ogunbiyi</h2> | ||
| </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.
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
patternattribute to disallow any name that contains only space characters?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 pointing this out. I hadn't considered that scenario.
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.
These changes has now been applied.