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
56 changes: 51 additions & 5 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<!--Tasks-->
<!-- Customer name (required, at least 2 non-space characters) -->
<!-- Customer email (required, valid email) -->
<!-- T-shirt colour (required, choose 1 of 3 colours) -->
<!-- T-shirt size (required, choose 1 of XS, S, M, L, XL, XXL) -->
<!-- Submit button -->

<!DOCTYPE html>
<html lang="en">
<head>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

mismatch tags

Expand All @@ -13,15 +20,54 @@ <h1>Product Pick</h1>
</header>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

body tag missing

<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-->
<!--Customer Name-->
<label for="name">Name</label>
<input
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Validation done

type="text"
id="name"
name="name"
required pattern=".*\S.*\S.*"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can you provide simple validation pattern for the same.

/>
<!--Customer Email-->
<label for="email">Email</label>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

correct input type used and validation done

<input
type="email"
id="email"
name="email"
required
/>
<fieldset>
<!--Select T-shirt colour-->
<legend>Choose T-shirt Colour</legend>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

provide default selection

<input type="radio" id="purple" name="colour" value="purple" required>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Provide default selection

<label for="purple">Purple</label>
<input type="radio" id="white" name="colour" value="white">
<label for="white">White</label>
<input type="radio" id="black" name="colour" value="black">
<label for="black">Black</label>
</fieldset>
<fieldset>
<!--Select Size-->
<legend>Choose T-shirt Size</legend>
<input type="radio" id="xs" name="size" value="XS" required>
<label for="xs">XS</label>
<input type="radio" id="s" name="size" value="S">
<label for="s">S</label>
<input type="radio" id="m" name="size" value="M">
<label for="m">M</label>
<input type="radio" id="l" name="size" value="L">
<label for="l">L</label>
<input type="radio" id="xl" name="size" value="XL">
<label for="xl">XL</label>
<input type="radio" id="xxl" name="size" value="XXL">
<label for="xxl">XXL</label>
</fieldset>
<button type="submit">Submit Order</button>
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
<p>Maryam Janjua</p>
</footer>
</body>
</html>
Loading