Skip to content

ITP-May-25 Cape Town | Jordy Mukandayi | Module-Onboarding | Form-Controls |Week2 #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
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: 63 additions & 11 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,77 @@
<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="description"
content="T-shirt order form, select t-shirt color, and choose size."
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />

<title>T-Shirt Order Form</title>
</head>
<body>
<header>
<h1>Product Pick</h1>
<header class="header">
<h1>T-shirt 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 action="" method="POST">
<div class="label-name">
<label for="name">Name</label>
<input
type="text"
name="name"

Choose a reason for hiding this comment

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

You need to require a min of 2 char for the name

Copy link
Author

Choose a reason for hiding this comment

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

I added minlength="2" for require 2 char

Choose a reason for hiding this comment

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

Good

id="name"
placeholder="Enter full name "
required
minlength="2"
/>
</div>
<br>
<div class="label-email">
<label for="email">Email</label>
<input
name="email"
id="email"

Choose a reason for hiding this comment

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

You need to ensure that the email is valid

Copy link
Author

Choose a reason for hiding this comment

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

I changed type="text" to type="email"

Choose a reason for hiding this comment

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

Good

type="email"
placeholder="Enter your email"
required
/>
</div>
<br>
<div class="label-size">
<label for="size" class="tshirt">T-shirt Size</label>
<select id="size" name="size" required>
<option value="">Select a size</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>
</div>
<br>
<div class="radio">

Choose a reason for hiding this comment

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

This needs to be required

Copy link
Author

Choose a reason for hiding this comment

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

the select size have the required

Choose a reason for hiding this comment

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

good

<div>
<label for="black">Black</label>

Choose a reason for hiding this comment

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

The colors also needs to be required.

Copy link
Author

Choose a reason for hiding this comment

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

add required to colors

<input type="radio" name="color" id="black" value="black" required/>
</div>
<div>
<label for="white">White</label>
<input type="radio" name="color" id="white" value="white" />
</div>
<div>
<label for="blue">Blue</label>
<input type="radio" name="color" id="blue" value="blue" />
</div>
</div>
<br>
<button type="submit">Place Order</button>
</form>
</main>
<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>
<h2>By Jordy Mukandayi</h2>
</footer>
</body>
</html>