-
-
Notifications
You must be signed in to change notification settings - Fork 542
London | 26-ITP-SEP | Abdennour Hachemi | Sprint 1 | form-controls #1503
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 5 commits
30d9e25
e05cec1
cd10040
4ac2403
b0acd57
bba3065
5923885
e64b174
57d7ed9
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 |
|---|---|---|
| @@ -1,27 +1,98 @@ | ||
| <!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--> | ||
| <p>By HOMEWORK SOLUTION</p> | ||
| </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="Order form"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| <link rel="stylesheet" href="styles.css"> | ||
| </head> | ||
|
|
||
| <body> | ||
| <header> | ||
| <h1>Product Pick</h1> | ||
| </header> | ||
| <main> | ||
| <form> | ||
| <div id="fn"><label for="fname">Please Enter your First name:</label> | ||
| <input type="text" id="fname" name="fname" pattern=".*\S.*\S.*"> <br> | ||
| </div> | ||
| <div id="sn"><label for="lname">Please Enter your Last name:</label> | ||
| <input type="text" id="lname" name="lname" pattern=".*\S.*\S.*"> <br> | ||
| </div> | ||
| <div id="em"><label for="email">Please Enter your Email:</label> | ||
| <input type="email" id="email" name="email" required><br> | ||
| </div> | ||
| <div class="colorSelection"> | ||
| <label>Please pick a color:</label> <br> | ||
|
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 label isn't attached to any control, it's just acting as a heading for the group. Which element does the MDN page from the prep use to group a set of radio buttons and give them a caption? Same for line 50. |
||
| <div class="colorOption"> | ||
| <label for="blueOption">Blue</label> | ||
| <div class="square" id="blueOptions"> | ||
| <input type="radio" name="color" id="blueOption" value="blue"> | ||
| </div> | ||
| </div> | ||
| <div class="colorOption"> | ||
| <label for="greenOption">Green</label> | ||
| <div class="square" id="greenOptions"> | ||
| <input type="radio" name="color" id="greenOption"value="green"> | ||
|
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. Missing space between |
||
| </div> | ||
| </div> | ||
| <div class="colorOption"> | ||
| <label for="redOption">Red</label> | ||
| <div class="square" id="redOptions"> | ||
| <input type="radio" name="color" id="redOption" value="red" required> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div id="sizediv"> | ||
| <label>Please select the t-shirt size:</label> <br> . | ||
|
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. There's a stray |
||
| <div class="colorSelection"> | ||
| <div class="sizeOption"> | ||
| <label for="xs">XS</label> | ||
| <div> | ||
| <input type="radio" name="size" value="xs" id="xs"> | ||
|
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. Pick no size and submit: the form goes through. You've already solved this for colour on line 45. What's different about these six? |
||
| </div> | ||
| </div> | ||
| <div class="sizeOption"> | ||
| <label for="s">S</label> | ||
| <div> | ||
| <input type="radio" name="size" id="s" value="s"> | ||
| </div> | ||
| </div> | ||
| <div class="sizeOption"> | ||
| <label for="m">M</label> | ||
| <div> | ||
| <input type="radio" name="size" id="m" value="m"> | ||
| </div> | ||
| </div> | ||
| <div class="sizeOption"> | ||
| <label for="l">L</label> | ||
| <div> | ||
| <input type="radio" id="l" name="size" value="l"> | ||
| </div> | ||
| </div> | ||
| <div class="sizeOption"> | ||
| <label for="xl">XL</label> | ||
| <div> | ||
| <input type="radio" id="xl" name="size" value="xl"> | ||
| </div> | ||
| </div> | ||
| <div class="sizeOption"> | ||
| <label for="sizexxl">XXL</label> | ||
| <div> | ||
| <input type="radio" id ="sizexxl" name="size" value="xxl"> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </form> | ||
|
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 form closes here with no submit button. Open the deploy preview and try to send the form. What's missing, and what does the browser do with |
||
| </main> | ||
|
|
||
| <footer> | ||
| <p>By Abdennour Hachemi</p> | ||
| </footer> | ||
| </body> | ||
|
|
||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
|
|
||
| .colorSelection { | ||
| display: flex; | ||
| gap: 20px; | ||
| margin-left: 20px; | ||
| margin-top: 20px; | ||
| } | ||
|
|
||
| .colorOption { | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items:center; | ||
| } | ||
|
|
||
| .square { | ||
| height: 25px; | ||
| width: 25px; | ||
| } | ||
|
|
||
| #blueOptions { | ||
| background-color: #180fcb; | ||
| } | ||
|
|
||
| #greenOptions { | ||
| background-color: green; | ||
| } | ||
|
|
||
| #redOptions { | ||
| background-color: red; | ||
| } | ||
|
|
||
| #sizediv{ | ||
| margin:20px 20px; | ||
|
|
||
| } | ||
|
|
||
| #fn,#sn,#em{ | ||
| margin: 20px 20px; | ||
| } |
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.
The
patternattribute is right and does what the README asks. Once you've added a submit button, leave the name empty and submit. It goes through. What have you put on the email field on line 26 that this field doesn't have? Also, the task asks for one name field, not first and last.