|
6 | 6 | <title>Product Picker Form</title> |
7 | 7 | <meta name="description" content="" /> |
8 | 8 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 9 | + <link rel="stylesheet" href="style.css" /> |
9 | 10 | </head> |
10 | 11 | <body> |
11 | 12 | <header> |
12 | | - <h1>Choose your product</h1> |
| 13 | + <h1>Please Enter Your Details</h1> |
13 | 14 | </header> |
14 | 15 | <main> |
15 | 16 | <form> |
16 | | - <!-- Requirements: |
17 | | - - Ask for user name |
18 | | - - Ask for product type |
19 | | - - Ask for quantity |
20 | | - - Add validation |
21 | | - --> |
22 | | - |
23 | | - <label for="name">Your Name:</label> |
24 | | - <input id="name" name="name" type="text" required /> |
25 | | - <label for="product">Product:</label> |
26 | | - <select id="product" name="product" required> |
27 | | - <option value="">Select one</option> |
28 | | - <option value="shoes">Shoes</option> |
29 | | - <option value="bag">Bag</option> |
30 | | - <option value="hat">Hat</option> |
31 | | - </select> |
| 17 | + <!-- NAME --> |
| 18 | + <label for="name">Full Name:</label> |
| 19 | + <input |
| 20 | + id="name" |
| 21 | + name="name" |
| 22 | + type="text" |
| 23 | + required |
| 24 | + minlength="2" |
| 25 | + pattern=".*\S.*" |
| 26 | + placeholder="Jane Doe" |
| 27 | + /> |
| 28 | + |
| 29 | + <!-- EMAIL --> |
| 30 | + <label for="email">Email Address:</label> |
| 31 | + <input |
| 32 | + id="email" |
| 33 | + name="email" |
| 34 | + type="email" |
| 35 | + required |
| 36 | + placeholder="janedoe@gmail.com" |
| 37 | + /> |
| 38 | + |
| 39 | + <fieldset> |
| 40 | + <legend>Choose a Colour:</legend> |
| 41 | + |
| 42 | + <label> |
| 43 | + <input type="radio" name="colour" value="red" required /> |
| 44 | + Red |
| 45 | + </label> |
| 46 | + |
| 47 | + <label> |
| 48 | + <input type="radio" name="colour" value="blue" required /> |
| 49 | + Blue |
| 50 | + </label> |
| 51 | + |
| 52 | + <label> |
| 53 | + <input type="radio" name="colour" value="black" required /> |
| 54 | + Black |
| 55 | + </label> |
32 | 56 |
|
33 | | - <label for="qty">Quantity:</label> |
34 | | - <input id="qty" name="qty" type="number" min="1" max="10" required /> |
| 57 | + <label> |
| 58 | + <input type="radio" name="colour" value="pink" required /> |
| 59 | + Pink |
| 60 | + </label> |
| 61 | + |
| 62 | + <label> |
| 63 | + <input type="radio" name="colour" value="white" required /> |
| 64 | + White |
| 65 | + </label> |
| 66 | + |
| 67 | + <label> |
| 68 | + <input type="radio" name="colour" value="orange" required /> |
| 69 | + Orange |
| 70 | + </label> |
| 71 | + |
| 72 | + <label> |
| 73 | + <input type="radio" name="colour" value="purple" required /> |
| 74 | + Purple |
| 75 | + </label> |
| 76 | + </fieldset> |
| 77 | + |
| 78 | + <!-- SIZE --> |
| 79 | + <label for="size">Choose a Size:</label> |
| 80 | + <select id="size" name="size" required> |
| 81 | + <option value="">Select size</option> |
| 82 | + <option value="XS">XS</option> |
| 83 | + <option value="S">S</option> |
| 84 | + <option value="M">M</option> |
| 85 | + <option value="L">L</option> |
| 86 | + <option value="XL">XL</option> |
| 87 | + <option value="XXL">XXL</option> |
| 88 | + </select> |
35 | 89 |
|
36 | | - <button type="submit">Submit</button> |
| 90 | + <button type="submit">Submit Order</button> |
37 | 91 | </form> |
38 | 92 | </main> |
39 | 93 | <footer> |
|
0 commit comments