Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# HTML form
Replace `<your_account>` with your Github username and copy the links to Pull Request description:
- [DEMO LINK](https://<your_account>.github.io/layout_html-form/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_html-form/report/html_report/)
- [DEMO LINK](https://Luk2asz.github.io/layout_html-form/)
- [TEST REPORT LINK](https://Luk2asz.github.io/layout_html-form/report/html_report/)

> Follow [this instructions](https://mate-academy.github.io/layout_task-guideline/#how-to-solve-the-layout-tasks-on-github)
___
Expand Down Expand Up @@ -40,7 +40,7 @@ Create HTML page with form. On form submit send form data to `https://mate-acade
- Age should be at least `1` and at max `100` with a default value of `12`
- The email field should have placeholder value: `email@example.com`.
- Text fields should have `autocomplete="off"`.
- `Submit` button should have a `type="submit"`
- `Submit` button should have a `type="submit"`
- Vertical distance between inputs should be `10px`
- Vertical distance between groups should be `20px`
- Any other styles should be browser default
Expand Down
166 changes: 165 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,171 @@
<link rel="stylesheet" href="./style.css">
</head>
<body>
<h1>HTML Form</h1>
<form action="https://mate-academy-form-lesson.herokuapp.com/create-application" method="post">
<fieldset>
<legend>Personal information</legend>
<div class="form">

Choose a reason for hiding this comment

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

Change class name so it is not missleading. This HTML does not represents form, it is more like field-wrapper

Copy link
Author

Choose a reason for hiding this comment

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

I have corrected my code, please check now

<label>

Choose a reason for hiding this comment

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

Dont wrapp inputs with label.

Suggested change
<label>
<label for="surname">Surname:</label>

Add appropriate ids to form elements do the labels is connected

Copy link
Author

Choose a reason for hiding this comment

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

I have corrected my code, please check now

Surname:
<input type="text"
name="surname" autocomplete="off"
>

Choose a reason for hiding this comment

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

Fix formating in this file. Check the checklist for guidelince. It should be formatet like this:

Suggested change
<input type="text"
name="surname" autocomplete="off"
>
<input
type="text"
name="surname"
autocomplete="off"
>

Copy link
Author

Choose a reason for hiding this comment

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

I have corrected my code, please check now

</label>
</div>
<div class="form">
<label>
Name:
<input type="text"
name="name" autocomplete="off"
>
</label>
</div>
<div class="form">
<label>
How old are You?
<input type="number"
name="age"
id="age"
value="12"
min="1"
max="100"
>
</label>
</div>
<div class="form">
<label>
Full date of birth:
<input type="date"
name="date"
id="date"
>
</label>
</div>
<div class="formlsat">
<label>
I accept the term of the agreement
<input type="checkbox"
name="agree"
id="agree"
required
>
</label>
</div>
</fieldset>
<fieldset>
<legend>Registration</legend>
<div class="form">
<label>
E-mail:
<input type="email"
name="email"
id="email"
placeholder="email@example.com"
>
</label>
</div>
<div class="formlast">
<label>
Password:
<input type="password"
name="password"
id="password"
minlength="6"
maxlength="20"
>
</label>
</div>
</fieldset>
<fieldset>
<legend>An interesting fact about you!</legend>
<div class="form">
Do you love cats?
<label>
<input type="radio"
name="cats"
value="yes"
>
Yes
</label>
<label>
<input type="radio"
name="cats"
value="no"
>
No
</label>
</div>
<div class="form">
<label>
What is your favorite color?
<input type="color"
name="color"
id="color"
>
</label>
</div>
<div class="form">
<label>
What time do you go to bed?
<input type="time"
name="time"
id="time"
step="2"
>
</label>
</div>
<div class="form">
<label>
What are you favorite brand of cars?
<select name="select"
id="select"
multiple
>
<option value="BMW">BMW</option>
<option value="Audi">Audi</option>
<option value="Lada">Lada</option>
</select>
</label>
</div>
<div class="formlast">
<label>
How do you rate our work?
<input type="range"
name="range"
min="0"
max="10"
value="5"
placeholder="5"
>
</label>
</div>
</fieldset>
<fieldset>
<legend>Additional info</legend>
<div class="form">
Comments:
<textarea name="textarea"></textarea>
</div>
<div class="formlast">
<label>
Would you recommend us?
<select name="recommend"
id="recommend"
>
<option value="yes">yes</option>
<option value="no">no</option>
</select>
</label>
</div>
</fieldset>


<div class="form">
<input type="submit" value="Submit">
</div>

</form>

<script type="text/javascript" src="./main.js"></script>
</body>
</html>
7 changes: 7 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
/* styles go here */
.form {
margin-bottom: 10px;
}

fieldset {

Choose a reason for hiding this comment

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

Dont style using tags, add propper class name and style using it

Copy link
Author

Choose a reason for hiding this comment

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

I have corrected my code, please check now

margin-bottom: 20px;
}