Skip to content
110 changes: 86 additions & 24 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,89 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My form exercise</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<header>
<h1>Product Pick</h1>
</header>
<main>
<form>
<!-- write your html here-->
<!--
try writing out the requirements first as comments
this will also help you fill in your PR message later-->
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
</footer>
</body>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Shirt Order Form</title>
</head>

<body>

<main>
<form action="/my-handling-form-page" method="post">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Why use POST method to submit the form data?

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.

Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You didn't answer what I asked, and how did you resolve it?

<p>Please complete all required (*) fields.</p>

<p>
<label>
What is your name?*
<input type="text" name="user_name" pattern=".*[A-Za-z].*" required>
</label>
</p>


<p>
<label>
What is your email?*
<input type="email" name="user_email" required placeholder="Format: name1@nnn.com">
</label>
</p>

<fieldset>
<legend>What colour of shirt do you want?*</legend>

<label>
<input type="radio" required name="colour" value="Green">
Green
</label>

<label>
<input type="radio" required name="colour" value="Red">
Red
</label>

<label>
<input type="radio" required name="colour" value="Blue">
Blue
</label>
Comment thread
Ayogit1 marked this conversation as resolved.
</fieldset>

<fieldset>
<legend>What size of shirt do you want?*</legend>

<label>
<input type="radio" required name="size" value="XS">
XS
</label>

<label>
<input type="radio" required name="size" value="S">
S
</label>

<label>
<input type="radio" required name="size" value="M">
M
</label>

<label>
<input type="radio" required name="size" value="L">
L
</label>

<label>
<input type="radio" required name="size" value="XL">
XL
</label>

<label>
<input type="radio" required name="size" value="XXL">
XXL
</label>
</fieldset>
</form>
</main>

</body>

</html>