Skip to content

West Midlands | ITP-May-2025 | Jonathan Boahene | Form-Control #718

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 1 commit 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
119 changes: 112 additions & 7 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
<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="A product selection form to collect customer preferences and delivery details"
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
Expand All @@ -13,15 +16,117 @@ <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-->
<section>
<h2>Customer information</h2>
<fieldset>
<legend>Identity</legend>
<label for="name">Name: </label>
<input
type="text"
id="name"
name="user-name"
pattern="[A-Za-z\s]{2,}"
required
title="Please enter your full name with at least two letters."
/>

<label for="mail">Email: </label>
<input
type="email"
id="mail"
name="email"
pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$"
required
title="Please enter a valid email address."
autocomplete="on"
/>
</fieldset>
</section>

<section>
<fieldset>
<legend>Choose Colour</legend>
<ul>
<li>
<label for="gold">
<input
type="radio"
id="gold"
name="colour"
value="gold"
required
/>
Gold
</label>
</li>
<li>
<label for="silver">
<input
type="radio"
id="silver"
name="colour"
value="silver"
required
/>
Silver
</label>
</li>
<li>
<label for="diamond">
<input
type="radio"
id="diamond"
name="colour"
value="diamond"
required
/>
Diamond
</label>
</li>
</ul>
</fieldset>
</section>
<section>
<fieldset>
<legend>Choose Size</legend>
<label for="size">
Size:
<select id="size" name="size" required>
<option value="" disabled selected>Select a size</option>
<option value="xs">Extra Small</option>
<option value="s">Small</option>
<option value="m">Medium</option>
<option value="l">Large</option>
<option value="xl">Extra Large</option>
<option value="xxl">Extra Extra Large</option>
</select>
</label>
</fieldset>
</section>
<section>
<fieldset>
<legend>Choose Delivery Date</legend>
<label for="delivery-date">Delivery Date: </label>
<input
type="date"
id="delivery-date"
name="delivery-date"
min="2025-01-01"
max="2025-12-31"
required
/>
</fieldset>
</section>

<section>
<p>
<button type="submit">Submit Details</button>
</p>
</section>
</form>
</main>
<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>
<p>© 2025 Abayie</p>
</footer>
</body>
</html>