Skip to content
Closed
Changes from 11 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
63 changes: 56 additions & 7 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,71 @@
<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>
<h1>T-Shirt Choice</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-->
<p>Please complete all required (*) fields</p>
<section>
<P>
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.

Should the tag be <p> or <P>? Can you research online and find the correct casing?

<label for="name">NAME *:</label>
<input type="text" id="name" name="fullname" required>
</P>
<P>
<label for="mail">EMAIL *:</label>
<input type="email" id="mail" name="user-mail" required>
</P>
</section>


<section>
<h2> Colour</h2>


<fieldset>

<legend>CHOICE</legend>

<label>
<input type="radio"name="choice" value="G" required> GREEN
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.

I see a space missing between type and name.

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.

Thank you very much done.

</label>

<label>
<input type="radio"name="choice" value="B"> BLUE
</label>

<label>
<input type="radio"name="choice" value="R"> RED
</label>

</fieldset>
</section>
<section>
<h2>Size</h2>
<label for="size"> Size</label>
<select id="size" name="size" required>
<option value=""> SELECT </option>
<option value="xtra-small">XS</option>
<option value="small">S</option>
<option value="medium">M</option>
<option value="large">L</option>
<option value="xtra-large">XL</option>
<option value="double-xtra-large">XXL</option>
</select>
</section>

</form>
</main>
<p>
<button>SUBMIT</button>
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.

I see you added the submit button. This is good however the submit button is currently outside of the form.
In order for the form validation (i.e. required fields) to be triggered a submit button has to be within the form.
Can you try to make that change and then ensure that when you click on the button, you get a message if you leave required fields empty.

</p>

<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>
<p><em> TASLEEM ADEDOKUN</em></p>
</footer>
</body>
</html>