Skip to content
Open
Show file tree
Hide file tree
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
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://kyrylomanko.github.io/layout_html-form/)
- [TEST REPORT LINK](https://kyrylomanko.github.io/layout_html-form/report/html_report/)
Comment on lines +3 to +4
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You should add these links to the PR description


> 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
164 changes: 163 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,169 @@
<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 class="fieldset">
<legend>Personal information</legend>
<label for="surname" class="form">
Surname:
<input
cletype="text"
class="form-field"
id="surname"
name="surname"
autocomplete="off"
>
</label>
<label for="name" class="form">
Name:
<input
type="text"
class="form-field"
id="name"
name="name"
autocomplete="off"
>
</label>
<label for="age" class="form">
How old are You?
<input
type="number"
class="form-field"
id="age"
name="age"
min="1"
max="100"
value="12"
>
</label>
<label for="birth" class="form">
Full date of birth:
<input
type="date"
class="form-field"
id="birth"
name="birth"
>
</label>
<label for="checkbox" class="form">
I accept the term of the agreement
<input
type="checkbox"
id="checkbox"
name="checkbox"
>
</label>
</fieldset>

<fieldset class="fieldset">
<legend>Registration</legend>
<label for="email" class="form">
E-mail:
<input
type="email"
class="form-field"
id="email"
name="email"
placeholder="email@example.com"
required
>
</label>
<label for="password" class="form">
Password:
<input
minlength="5"
maxlength="12"
type="password"
id="password"
name="password"
required
>
</label>
</fieldset>

<fieldset class="fieldset">
<legend>An interesting fact about you!</legend>
<div class="form-field">
<label for="cat" class="form">
Do you love cats?
<input type="radio" name="answer">
Yes
<input type="radio" name="answer">
No
</label>
</div>
<label for="color" class="form">
What is your favorite color?
<input
type="color"
class="form-field"
id="color"
name="color"
>
</label>
<label for="time" class="form">
What time do you go to bed?
<input
type="time"
step="1"
class="form-field"
id="time"
name="time"
>
</label>

<div class="form-field">
<label for="car" class="form">
What are your favorite brand of cars?
<select
name="car"
id="car"
multiple
>
<option value="BMW">BMW</option>
<option value="Audi">Audi</option>
<option value="Lada">Lada</option>
</select>
</label>
</div>

<label for="rate">How do you rate our work?
<input
type="range"
value="0"
name="rate"
id="rate"
>
</label>
</fieldset>

<fieldset>
<legend>Additional info:</legend>
<div class="form-field">
<label for="cm" class="form">
Comments:
<textarea autocomplete="off"></textarea>
</label>
</div>

<div>
<label for="rec" class="form">
Would you recommend us?
<select name="rec" id="rec">
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
</label>
</div>

</fieldset>

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

</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 {
display: block;
}

.fieldset {
margin-bottom: 20px;
}