Skip to content

Commit b82bdb5

Browse files
authored
Added T-shirt colour and size options, form validation, and submit button
1 parent 627518f commit b82bdb5

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

Form-Controls/index.html

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,38 @@ <h1>Product Pick</h1>
1616
<h2>Customer information</h2>
1717
<!-- Customer name must contain at least two non-space characters.-->
1818
<label for="name">Name:</label>
19-
<input type="text" id="name" pattern=".*\S.*\S.*" required>
19+
<input type="text" id="name" pattern=".*\S.*\S.*" required>
20+
<br><br>
2021
<!-- Customer email must be valid and follow a consistent email address pattern.-->
2122
<label for="email">Email:</label>
2223
<input type="email" id="email" required>
2324
<!-- Provide 3 T-shirt colour options.-->
25+
<h2>T-Shirt Colour</h2>
26+
<label for="colour">Choose colour:</label>
27+
<select id="colour" name="colour" required>
28+
<option value=""></option>
29+
<option value="black">Black</option>
30+
<option value="white">White</option>
31+
<option value="pink">Pink</option>
32+
</select>
2433
<!-- Provide 6 size options: XS, S, M, L, XL, XXL-->
34+
<h2>T-shirt size</h2>
35+
<lable for="size">Choose size:</lable>
36+
<select id="size" name="size" required>
37+
<option value=""></option>
38+
<option value="xs">XS</option>
39+
<option value="s">S</option>
40+
<option value="m">M</option>
41+
<option value="l">L</option>
42+
<option value="xl">XL</option>
43+
<option value="xxl">XXL</option>
44+
</select>
45+
<button type="submit">submit</button>
2546
</form>
2647
</main>
2748
<footer>
2849
<!-- change to your name-->
29-
<p>By HOMEWORK SOLUTION</p>
50+
<p>By Abakar Souleyman</p>
3051
</footer>
3152
</body>
3253
</html>

0 commit comments

Comments
 (0)