Skip to content
61 changes: 59 additions & 2 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My form exercise</title>
<meta name="description" content="" />
<meta name="description" content="Christelle's form which allows customers to fill their details and the kind of T shirt they like." />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
Expand All @@ -14,14 +14,71 @@ <h1>Product Pick</h1>
<main>
<form>
<!-- write your html here-->
<p>
<label for="name"> Name:</label>
<input type="text" id="name" name="user_name" required pattern=".*\S.*\S.*" title="Please enter at least 2 non-space characters"/>
</p>
<p>
<label for="mail">Email: </label>
<input type="email" id="mail" name="user_name" required/>
</p>

<fieldset>
<legend> Please choose a colour:</legend>
<p>
<label>
<input type="radio" name="colour" value="white" required>
White
</label>
</p>
<p>
<label>
<input type="radio" name="colour" value="black" required>
Black
</label>
</p>
<p>
<label>
<input type="radio" name="colour" value="red" required>
Red
</label>
</p>

</fieldset>

<p>
<label for="size">
<span> Choose your size:</span>
</label>
<select id="size" name="user-size" required>
<option value="">--Select--</option>
<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>
</p>
<p class="button">
<button type ="submit">Submit</button>
<button type="reset">Reset</button>

</p>

<!--
try writing out the requirements first as comments
- What is the customer's name? I must collect this data and ensure it contains at least two non-space characters.
-What is the customer's email? I must make sure the email is valid. Email addresses follow a consistent pattern.
- What colour should this T-shirt be? I must provide 3 options. How will I ensure they do not choose other colours?
- What size does the customer want? I must provide the following 6 options: XS, S, M, L, XL, XXL
this will also help you fill in your PR message later-->
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
<p>By Christelle Boten</p>
</footer>
</body>
</html>
Loading