Skip to content
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

ITP-JAN-25-LONDON| BAKYTBEK SYDYKOV | module-onboarding/Form controls| Week2 #214

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
18 changes: 6 additions & 12 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
<!--

You must title your PR like this:

COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK

For example,

NW4 | Carol Owen | HTML-CSS-Module | Week1
ITP-JAN-25 | Bakytbek Sydykov | Module-Onboarding Fuature/wireframe | Week1

Complete the task list below this message.
If your PR is rejected, check the task list.
Expand All @@ -17,15 +11,15 @@ If your PR is rejected, check the task list.

Self checklist

- [ ] I have committed my files one by one, on purpose, and for a reason
- [ ] I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
- [x] I have committed my files one by one, on purpose, and for a reason
- [x] I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
- [ ] I have tested my changes
- [ ] My changes follow the [style guide](https://curriculum.codeyourfuture.io/guides/reviewing/style-guide/)
- [ ] My changes meet the [requirements](./README.md) of this task
- [x] My changes follow the [style guide](https://curriculum.codeyourfuture.io/guides/reviewing/style-guide/)
- [x] My changes meet the [requirements](./README.md) of this task

## Changelist

Briefly explain your PR.


## Questions

Expand Down
8 changes: 8 additions & 0 deletions Form-Controls/articles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
1. What is the customer's name? I must collect this data, and validate it. But what is a valid name? I must decide something.
HTML
2. What is the customer's email? I must make sure the email is valid. Email addresses have a consistent pattern.
HTML
3. What colour should this t-shirt be? I must give 3 options. How will I make sure they don't pick other colours?
HTML
4. What size does the customer want? I must give the following 6 options: XS, S, M, L, XL, XXL
HTML
50 changes: 43 additions & 7 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My form exercise</title>
<title> My form exercise </title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
Expand All @@ -13,15 +13,51 @@ <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-->
<div>
<label for="name">Full name:</label>
<input type="text" id="name" name="user_name" required minlength="2" maxlength="50" placeholder="Enter your name" />
Age:
<input type="number" id="age" name="age">
</div>
<div>
<label for="e-mail">Email:</label>
<input type="e-mail" id="e-mail" name="user e-mail" required placeholder="Enter your e-mail"/>
Copy link

Choose a reason for hiding this comment

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

There is no such input type as e-mail. Please, fix it.

Copy link

@tyzia tyzia Jan 25, 2025

Choose a reason for hiding this comment

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

Name attribute (as well as any other attributes) can't have spaces inside. Please, fix it.

Copy link
Author

Choose a reason for hiding this comment

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

done

</div>
<div>
<label for="color"> Please choose a color </label> <br>
Copy link

Choose a reason for hiding this comment

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

I don't see any input with id color. I don't think you need this for attribute.

Copy link

Choose a reason for hiding this comment

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

Labels are usually used with inputs. If you don't have any corresponding input, I would suggest to replace <label> tag with something else.

<input type="radio" id="green" name="t-shirt color" value="green">
<label for="green"> Green</label>
<input type="radio" id="red" name="t-shirt color" value="red">
<label for="red"> Red</label>
<input type="radio" id="yellow" name="t-shirt color" value="yellow">
<label for="yellow"> Yellow</label>
</div>

<div>
<label for="size"> Please choose a T-shirt's size: </label>
<select id="size" name="size">
<option disabled selected value> -- select 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>
</div>
<div>
<label for="comment"> Comment: </label>
<input type="text" id="comment" name="comment">
Copy link

Choose a reason for hiding this comment

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

It is good that you have comment field. Usually comments are long texts. What can be a better tag for this type of input?

Copy link
Author

Choose a reason for hiding this comment

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

The textarea is a better tag.

</div>
<div>
<button type="submit"> SUBMIT</button>
</div>

</form>
</main>
<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>

<p>By Bakytbek Sydykov</p>
</footer>
</body>
</html>