Skip to content
Open
Show file tree
Hide file tree
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
90 changes: 81 additions & 9 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,97 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My form exercise</title>
<meta name="description" content="" />
<title>My Form Exercise</title>
<meta name="description" content="T-shirt order form" />
<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 action="#" method="get">
<fieldset>
<legend>Customer Details</legend>

<p>
<label for="name">Name</label>
<input
type="text"
name="name"
id="name"
required
minlength="2"
pattern=".*\S.*"

Choose a reason for hiding this comment

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

What is this pattern attribute doing here?

Copy link
Author

Choose a reason for hiding this comment

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

It ensures the reader types in one character

Choose a reason for hiding this comment

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

Why do we need this as well as minlength="2"?

Copy link
Author

Choose a reason for hiding this comment

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

minlength="2" only checks length, not content. Even if someone types two spaces, minlength="2" will accept it. The pattern ensures there’s at least one non-space character.

title="Name must contain at least one non-space character"
/>
</p>

<p>
<label for="email">Email</label>
<input type="email" name="email" id="email" required />
</p>
</fieldset>

<fieldset>
<legend>T.shirt Details</legend>

<p>
<label for="color">Color</label>
<select name="color" id="color" required>
<option value="" disabled selected>-- Select a colour --</option>
<option value="blue">Blue</option>
<option value="black">Black</option>
<option value="pink">Pink</option>
</select>
</p>
</fieldset>

<fieldset>
<legend>Size <span aria-hidden="true">*</span></legend>

Choose a reason for hiding this comment

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

What does aria-hidden do here?

Copy link
Author

Choose a reason for hiding this comment

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

It makes the asterisk to only be seen and not read out...


<p>
<input type="radio" required name="size" id="r1" value="XS" />
<label for="r1">XS</label>
</p>

<p>
<input type="radio" required name="size" id="r2" value="S" />
<label for="r2">S</label>
</p>

<p>
<input type="radio" required name="size" id="r3" value="M" />
<label for="r3">M</label>
</p>

<p>
<input type="radio" required name="size" id="r4" value="L" />
<label for="r4">L</label>
</p>

<p>
<input type="radio" required name="size" id="r5" value="XL" />
<label for="r5">XL</label>
</p>

<p>
<input type="radio" required name="size" id="r6" value="XXL" />
<label for="r6">XXL</label>
</p>
</fieldset>

<p>
<button type="reset">Reset</button>
<button type="submit">Submit</button>
</p>
</form>
</main>

<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>
<h2>By Jennifer Isidienu</h2>
</footer>
</body>
</html>
38 changes: 0 additions & 38 deletions Wireframe/README.md

This file was deleted.

33 changes: 0 additions & 33 deletions Wireframe/index.html

This file was deleted.

6 changes: 0 additions & 6 deletions Wireframe/placeholder.svg

This file was deleted.

89 changes: 0 additions & 89 deletions Wireframe/style.css

This file was deleted.

Binary file removed Wireframe/wireframe.png
Binary file not shown.
Loading