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

HTML FORM #787

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
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
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://Sadeni-09.github.io/layout_html-form/)
- [TEST REPORT LINK](https://Sadeni-09.github.io/layout_html-form/report/html_report/)
Sadeni-09 marked this conversation as resolved.
Show resolved Hide resolved

> Follow [this instructions](https://mate-academy.github.io/layout_task-guideline/#how-to-solve-the-layout-tasks-on-github)
___
Expand Down
155 changes: 151 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,164 @@
<!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"
<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">
<title>HTML Form</title>
<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="groupField">
<legend>Personal information:</legend>
<label class="form-field">
Surname:
<input
type="text"
name="surname"
autocomplete="off"
>
</label>

<label class="form-field">
Name:
<input
type="text"
name="name"
required
autocomplete="off"
>
</label>

<label class="form-field">
How old are You?
<input
type="number"
name="age"
value="12"
min="1"
max="100"
>
</label>

<label class="form-field">
Full date of birth:
<input
type="date"
name="dateOfBirth"
value="mm/dd/yyyy"
>
Anastasiia-Svintsova marked this conversation as resolved.
Show resolved Hide resolved
</label>

<label>
I accept the term of the agreement
<input type="checkbox" name="terms">
</label>
</fieldset>

<fieldset class="groupField">
<legend>Registration:</legend>
<label for="email" class="form-field">
E-mail:
<input
type="email"
name="email"
placeholder="[email protected]"
required
>
</label>

<label>
Password:
<input
type="password"
name="password"
required
>
</label>
</fieldset>

<fieldset class="groupField">
<legend>An interesting fact about you!</legend>
<div class="form-field">
Do you love cats?
<label>
<input type="radio" name="cat">
Yes
</label>

<label>
<input type="radio" name="cat">
No
</label>
</div>
<label class="form-field">
What is your favorite color?
<input
type="color"
name="color"
value="#000000"
>
</label>

<label class="form-field">
What time do you go to bed?
<input
type="time"
name="timeToBed"
step="2"
>
</label>

<label class="form-field">
What are your favorite brands of cars?
<select name="carBrand" multiple>
<option value="BMW">BMW</option>
<option value="Audi">Audi</option>
<option value="lada">lada</option>
</select>
</label>

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

<fieldset class="groupField">
<legend>Additional info:</legend>
<label for="comments" class="form-field">
Comments:
<textarea
class="comment"
name="comments"
minlength="50"
maxlength="300"
></textarea>
</label>

<label>
Would you reccomend us?
<select name="reccomend">
<option value="yes">yes</option>
<option value="no">no</option>
</select>
</label>
</fieldset>

<button type="submit">Submit</button>
</form>
</body>

</html>
8 changes: 8 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
/* styles go here */
.groupField {
margin-bottom: 20px;
}

.form-field {
margin-bottom: 10px;
display: block;
}