Skip to content

Commit f25e43b

Browse files
Add form controls and fix HTML button tag
1 parent f5b9e81 commit f25e43b

1 file changed

Lines changed: 49 additions & 2 deletions

File tree

Form-Controls/index.html

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,63 @@
88
<meta name="viewport" content="width=device-width, initial-scale=1" />
99
</head>
1010
<body>
11+
<form>
12+
<!-- 1. Customer Name (At least 2 non-space characters using pattern regex) -->
13+
<div>
14+
<label for="name">Name:</label>
15+
<input
16+
type="text"
17+
id="name"
18+
name="name"
19+
pattern=".*\S.*\S.*"
20+
title="Name must contain at least two non-space characters."
21+
required
22+
>
23+
</div>
24+
<!-- 2. Customer Email -->
25+
<div>
26+
<label for="email">Email:</label>
27+
<input
28+
type="email"
29+
id="email"
30+
name="email"
31+
required
32+
>
33+
</div>
34+
<!-- 3. T-shirt Colour (3 options) -->
35+
<div>
36+
<label for="colour">T-shirt Colour:</label>
37+
<select id="colour" name="colour" required>
38+
<option value="" disabled selected>Select a colour</option>
39+
<option value="red">Red</option>
40+
<option value="blue">Blue</option>
41+
<option value="black">Black</option>
42+
</select>
43+
</div>
44+
<!-- 4. T-shirt Size (6 options: XS, S, M, L, XL, XXL) -->
45+
<div>
46+
<label for="size">T-shirt Size:</label>
47+
<select id="size" name="size" required>
48+
<option value="" disabled selected>Select a size</option>
49+
<option value="XS">XS</option>
50+
<option value="S">S</option>
51+
<option value="M">M</option>
52+
<option value="L">L</option>
53+
<option value="XL">XL</option>
54+
<option value="XXL">XXL</option>
55+
</select>
56+
</div>
57+
58+
<!-- Submit Button -->
59+
<button type="submit">Submit Order</button>
1160
<header>
1261
<h1>Product Pick</h1>
1362
</header>
1463
<main>
15-
<form>
1664
<!-- write your html here-->
1765
<!--
1866
try writing out the requirements first as comments
1967
this will also help you fill in your PR message later-->
20-
</form>
2168
</main>
2269
<footer>
2370
<!-- change to your name-->

0 commit comments

Comments
 (0)