Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 70 additions & 4 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,81 @@ <h1>Product Pick</h1>
</header>
<main>
<form>
<!-- write your html here-->
<!--
<p>
Please fill out the form below to order your T-shirt. Fields marked with an asterisk (*) are required.
</p>
<!-- Field for Customer’s Name-->
<div>
<label for="name">Name*:</label>
<input type="text" id="name" name="customer_name" required pattern=".*\S.*\S.*">
<i>(at least 2 characters)</i>
</div>

<!-- Field for Customer’s Email-->
<div>
<label for="email">Email*:</label>
<input type="email" id="email" name="customer_email" required>
</div>

<!-- Radio Button for T-shirt Colour-->
<fieldset>
<legend>T-shirt Colour*:</legend>
<input type="radio" id="colour" name="tshirt_colour" value="red" required>
<label for="colour">Red</label>
<input type="radio" id="colour2" name="tshirt_colour" value="yellow">
<label for="colour2">Yellow</label>
<input type="radio" id="colour3" name="tshirt_colour" value="green">
<label for="colour3">Green</label>
</fieldset>


<!-- Radio Button for T-shirt Size-->
<fieldset>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: I would change the form types. Radio buttons are good if there are not to many options to choose from. Space on a web page is precious and for inputs with a lot of options a dropdown can save a lot of space. (You don't need to change anything. This is just an information on the different input types)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it and absolutely agree with that. Thank you so much!

<legend>T-shirt Size*:</legend>
<div>
<input type="radio" id="size" name="tshirt_size" value="small" required>
<label for="size">XS</label>
</div>

<div>
<input type="radio" id="size2" name="tshirt_size" value="medium">
<label for="size2">S</label>
</div>

<div>
<input type="radio" id="size3" name="tshirt_size" value="large">
<label for="size3">M</label>
</div>

<div>
<input type="radio" id="size4" name="tshirt_size" value="xlarge">
<label for="size4">L</label>
</div>

<div>
<input type="radio" id="size5" name="tshirt_size" value="xxlarge">
<label for="size5">XL</label>
</div>

<div>
<input type="radio" id="size6" name="tshirt_size" value="xxxlarge">
<label for="size6">XXL</label>
</div>

</fieldset>
<!-- Submit and Reset Buttons-->
<p>
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</p>
<!--
try writing out the requirements first as comments
this will also help you fill in your PR message later-->
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 Phoebe Wong</p>
</footer>
</body>
</html>
Loading