Skip to content
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
58 changes: 50 additions & 8 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,58 @@
<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>
<form>
<!-- write your html here-->
<!--
try writing out the requirements first as comments
this will also help you fill in your PR message later-->
<fieldset>
<label for="name">
<span>Customer Name: </span>
<strong><span aria-label="required">*</span></strong>
</label>
<input type="text" id="name" name="customer-name" required pattern="[A-Za-z\s\.]+" minlength="2" maxlength="40"/>

Choose a reason for hiding this comment

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

Some people have very long names,how would your application react to this?

Copy link
Author

Choose a reason for hiding this comment

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

I just think that most name is not more than 40 character but if the name is more than than I can delete teh maxlength and then there will be no limit for the name character

</fieldset>
<fieldset>
<label for="email">
<span>Email: </span>
<strong><span aria-label="required">*</span></strong>
</label>
<input type="email" id="email" name="customer-mail" required minlength="5" maxlength="50" placeholder="example@gmail.com" />

Choose a reason for hiding this comment

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

same comment as for the names, if they have a very long email, would they still be able to use your app?

Copy link
Author

Choose a reason for hiding this comment

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

I just limit the length in to 50, but if i thought that there is email more than that i can change the maxlenght to more than 50

</fieldset>
<fieldset>
<label for="color preference">
<span>Color:</span>
<strong><span aria-label="required">*</span></strong>
</label>
<select id="color preference" name="color preference">

Choose a reason for hiding this comment

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

You offer one of the options pre-selected here. What do you think would happen if someone pressed the "enter" key thinking it would take them through the form to make choices?

Copy link
Author

Choose a reason for hiding this comment

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

based on this the color is selected by default, but I can add another option in which it will not select a color but disable it

<option value="" disabled selected>Select a color</option>
<option value="blue">Blue</option>
<option value="white">White</option>
<option value="red">Red</option>
</select>
</fieldset>
<fieldset>
<label for="size">
<span>Size</span>
<strong><span aria-label="required">*</span></strong>
</label>
<select id="size" name="size">
<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>
</fieldset>
<button type="reset"> Reset</button>
<button type="submit"> Submit</button>
</form>
<!-- change to your name-->
</main>
<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>
<h2>By Abraham Habte</h2>
</footer>
</body>
</html>