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

add test solution #800

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 23 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
4 changes: 2 additions & 2 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://arturgorniak.github.io/layout_html-form/)
- [TEST REPORT LINK](https://arturgorniak.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
238 changes: 233 additions & 5 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,245 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
charset="UTF-8"
>
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0,
maximum-scale=1.0, minimum-scale=1.0"
>
<meta
http-equiv="X-UA-Compatible"
content="ie=edge"
>
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>HTML Form</title>
<link rel="stylesheet" href="./style.css">
</head>

<body>
<h1>HTML Form</h1>
<form
Copy link

Choose a reason for hiding this comment

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

Please fix the formatting of the code. You have to use the correct code indentations.

Look Dorota's mentions before and apply it in the whole code :)

    <form 
       action="https://mate-academy-form-lesson.herokuapp.com/create-application"
       method="post"
       name="personalInformation"
    >

action="https://mate-academy-form-lesson.herokuapp.com/create-application"
method="post"
name="personalInformation"
>
<fieldset class="form-fieldset">
<legend>Personal information</legend>
<div class="form-field">
<label for="surname">
Surname:

<input
type="text"
autocomplete="off"
id="surname"
name="surname"
>

</label>
</div>
<div class="form-field">
<label for="name">
Name:

<input
type="text"
autocomplete="off"
id="name"
name="name"
>

</label>
</div>
<div class="form-field">
<label for="age">
How old are You?

<input
type="number"
id="age"
min="1"
max="100"
value="12"
name="age"
>

</label>
</div>
<div class="form-field">
<label for="date">
Full date of birth:

<input
type="date"
id="date"
name="date"
>

</label>
</div>
<div class="form-field">
<label for="agreement">
I accept the term of the agreement

<input
type="checkbox"
name="agreement"
id="agreement"
required
>

</label>
</div>
</fieldset>
<fieldset class="form-fieldset">
<legend>Registration</legend>
<div class="form-field">
<label for="email">
E-mail:

<input
type="email"
name="email"
id="email"
placeholder="[email protected]"
>

</label>
</div>
<div class="form-field">
<label for="password">
Password:

<input
type="password"
name="password"
id="password"
minlength="6"
maxlength="15"
>

</label>
</div>
</fieldset>
<fieldset class="form-fieldset">
<legend>An interesting fact about you!</legend>
<div class="form-field">
<label for="cats">
Do you love cats?

<input
type="radio"
name="cats"
id="catsYes"
>
Yes

<input
type="radio"
name="cats"
id="catsNo"
>
No

</label>
</div>
<div class="form-field">
<label for="color">
What is your favorite color?

<input
type="color"
name="color"
id="color"
>

</label>
</div>
<div class="form-field">
<label for="sleep">
What time do you go to bed?

<input
type="time"
name="sleep"
id="sleep"
>

</label>
</div>
<div class="form-field">
<label for="cars">
What are your favorite brand of cars?

<select

Choose a reason for hiding this comment

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

Fix formatting

Choose a reason for hiding this comment

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

Fix formating for this select tag, add indentations

name="cars"
id="cars"
multiple>
<option value="bmw">BMW</option>
<option value="audi">Audi</option>
<option value="lada">Lada</option>
</select>

</label>
</div>
<div class="form-field">
<label for="rating">
How do you rate our work?

<input
type="range"
name="rating"
id="rating"
value="0"
>

</label>
</div>
</fieldset>
<fieldset class="form-fieldset">
<legend>Additional info:</legend>
<div class="form-field">
<label for="comments">
Comments:

<textarea
name="comments"
autocomplete="off"
id="comments"
cols="20"
rows="2"
></textarea>

</label>
</div>
<div class="form-field">
<label for="recomendation">
Would you recomend us?

<select
name="recomendation"
id="recomendation">
<option value="yes">Yes</option>
<option value="no">No</option>
</select>

</label>
</div>
</fieldset>
<div class="form-field">
<label for="submit">

<input
id="submit"
type="submit"
value="Submit"
>

Choose a reason for hiding this comment

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

remove empty line

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

.form-field:last-child {
margin-bottom: 0;
}

.form-fieldset {
margin-bottom: 20px;
}