Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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://TheOldDream.github.io/layout_html-form/)
- [TEST REPORT LINK](https://TheOldDream.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
201 changes: 200 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,206 @@
<link rel="stylesheet" href="./style.css">
</head>
<body>
<h1>HTML Form</h1>
<script type="text/javascript" src="./main.js"></script>
<form action="https://mate-academy-form-lesson.herokuapp.com/create-application" method="post">
<fieldset class="PersonalInformation" id="PersonalInformation">
<legend>Personal information</legend>
<label class="form_field" id="L1">
<div>
Surname:
<input
name="Surname"
type="text"
autocomplete="off"
required
minlength="5"
maxlength="35"
>
</div>
</label>

<label class="form_field">
<div>
Name:
<input
name="Name"
type="text"
autocomplete="off"
required
minlength="5"
maxlength="25"
>
</div>
</label>

<label class="form_field">
<div>
How old are You?
<input
name="Age"
id="Age"
type="number"
required
min="1"
max="100"
value="12"
>
</div>
</label>

<label class="form_field">
<div>
Full date of birth:
<input
name="submissionDate"
type="date"
required
>
</div>
</label>

<label class="form_field" id="L2">
<div>
I accept the term of the agreement
<input
type="checkbox"
name="Terms"
id="terms"
required
>
</div>
</label>
</fieldset>


<fieldset class="Registration" id="Registration">
<legend>Registration</legend>
<label class="form_field" id="L3">
<div>
E-mail:
<input
name="Email"
type="email"
required
minlength="10"
maxlength="35"
placeholder="email@example.com"
>
</div>
</label>

<label class="form_field" id="L4">
<div>
Password:
<input
name="Password"
type="password"
required
minlength="5"
maxlength="25"
>
</div>
</label>
</fieldset>

<fieldset class="AIFAY" id="AIFAY">
<legend>An interesting fact about you!</legend>
<label class="form_field" id="L5">
<div>
Do you love Cats?
<input
name="Answer"
type="radio"
>
Yes
<input
name="Answer"
type="radio"
>
No
</div>
</label>

<label class="form_field">
<div>
What is your favorite Colour?
<input
name="color"
type="color"
required
>
</div>

</label>

<label class="form_field">
<div>
What time do you go to bed?
<input
name="time"
type="time"
required
>
</div>
</label>

<label class="form_field">
<div>
What are your favorite brand of cars?
<select multiple name="selection">
<!-- <option value="Choose" disabled>Choose</option> -->
<option value="Bmw" multiple>Bmw</option>
<option value="Audi" multiple>Audi</option>
<option value="Lada" multiple>Lada</option>
</select>
</div>
</label>

<label class="form_field" id="L6">
<div>
How do you rate our work?
<input
type="range"
name="rating"
value="0"
>
</div>
</label>
</fieldset>

<fieldset class="AdditionalInformation" id="AdditionalInformation">
<legend>Additional info:</legend>
<label class="form_field" id="L7">
<div>
Comments:
<textarea
name="comment"
rows="2"
cols="20"
autocomplete="off"
></textarea>
</div>
</label>

<label class="form_field" id="L8">
<div>
Would you reccomend us?
<select name="select">
<option value="select" disabled>Please select an option</option>
<option value="Yes">Yes</option>
<option value="No">No</option>
</select>
</div>
</label>
</fieldset>

<button
class="button"
type="submit"
name="submit"
>
Submit
</button>
</form>
</body>
</html>
65 changes: 65 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,66 @@
/* styles go here */
.form_field {
display: block;
margin-top: 10px;
margin-bottom: 10px;
}

.personalInformation {
margin-top: 15px;
margin-bottom: 15px;
}

.Registration {
margin-top: 20px;
margin-bottom: 15px;
}

.AIFAY {
margin-top: 20px;
margin-bottom: 15px;
}

.AdditionalInformation {
margin-top: 20px;
margin-bottom: 15px;
}

#F1 {
margin-top: 0;
}

#F4 {
margin-bottom: 0;
}

#L1 {
margin-top: 0;
}

#L2 {
margin-bottom: 0;
}

#L3 {
margin-top: 0;
}

#L4 {
margin-bottom: 0;
}

#L5 {
margin-top: 0;
}

#L6 {
margin-bottom: 0;
}

#L7 {
margin-top: 0;
}

#L8 {
margin-bottom: 0;
}