Repository navigation
London | 26-ITP-SEP | Carol Nassuna | Sprint 1 | Form-Controls #1517
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 2 commits
6143696
78bef9c
384c503
76b166f
c52542a
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 |
|---|---|---|
|
|
@@ -12,11 +12,49 @@ | |
| <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 action="order" method="post"> | ||
| <div> | ||
| <label for="CustomerName">Customer Name:</label> | ||
| <input type="text" id="CustomerName" name="CustomerName" 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.
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. Fixed, and two spaces are rejected now. Good. |
||
| </div> | ||
| <div> | ||
| <label for="CustomerNumber">Customer Number:</label> | ||
| <input type="number" id="CustomerNumber" name="CustomerNumber" 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. Where in the task is a customer number asked for? Every extra required field is one more thing the customer has to get right before they can order.
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. Removed, good. |
||
| </div> | ||
| <div> | ||
| <label for="CustomerEmail">Customer Email:</label> | ||
| <input | ||
| type="email" | ||
| id="CustomerEmail" | ||
| name="CustomerEmail" | ||
| required | ||
| pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}" | ||
| title="Enter an email address such as name@example.com" | ||
| > | ||
| </div> | ||
| <div> | ||
| <label for="T-ShirtsColor">T-Shirt Color:</label> | ||
| <select id="T-ShirtsColor" name="T-ShirtsColor" required> | ||
| <option value="Red">Red</option> | ||
|
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. Red is selected as soon as the page loads, so
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. Both dropdowns fixed. Good. |
||
| <option value="Blue">Blue</option> | ||
| <option value="Green">Green</option> | ||
| </select> | ||
| </div> | ||
| <div> | ||
| <label for="T-ShirtsSize">T-Shirt Size:</label> | ||
| <select id="T-ShirtsSize" name="T-ShirtsSize" required> | ||
| <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> | ||
| </div> | ||
| </div> | ||
|
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. Which
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. Fixed. |
||
| <div> | ||
| <button type="submit">Place Order</button> | ||
| </div> | ||
| </form> | ||
| </main> | ||
| <footer> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
|
|
||
| form > div { | ||
| margin-bottom: 1em; | ||
| } | ||
|
|
||
| label { | ||
| font-weight: bold; | ||
| } | ||
|
|
||
| button { | ||
| background-color: #4CAF50; | ||
| color: black; | ||
| font-weight: bold; | ||
| padding: 10px 20px; | ||
| border: none; | ||
| border-radius: 4px; | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| button:hover { | ||
| background-color: #45a049; | ||
| } | ||
|
|
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 task says "Do not write a form action for this project". What happens on the deploy preview when you fill the form in correctly and press Place Order?
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.
Action gone. One thing left on this line, see the new comment.