Skip to content

London | ITP May25 | Mohammadreza Babaei | Form Control #574

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
53 changes: 47 additions & 6 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,56 @@ <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-->

<label for="name">Full name:</label>
<input type="text" id:"name" name"name" type="text" required minlength="2" />
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Can you improve the indentation of the code?

  2. Currently a user can enter a name consisting of only space characters (e.g., " "). Can you enforce a stricter validation rule using the pattern attribute to disallow any name that contains only space characters?

<br><br>



<label for="email">Email:</label>
<input type="email" id="email" name="email" required />
<br><br>


<fieldset>
<legend> Choose a colour</legend>
<label>
<input type="radio" name="colour" value="red" required />
Red
</label>

<label>
<input type="radio" name="coulour" value="blue" />
Blue
</label>
<label>
<input type="radio" name="colour" value="green" />
Green
</label>

</fieldset>
<br>


<label for="size"> Choose a size : </label>
<select name="size" id="size">
<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>
<br><br>


<button type="submit">Check Out</button>
</form>
</main>
<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>
<h2>Mo.reza Homework</h2>
</footer>
</body>
</html>