-
Notifications
You must be signed in to change notification settings - Fork 625
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 forms #783
Open
AnnBusya
wants to merge
2
commits into
mate-academy:master
Choose a base branch
from
AnnBusya:develop
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
add forms #783
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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://AnnBusya.github.io/layout_html-form/) | ||
- [TEST REPORT LINK](https://AnnBusya.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) | ||
___ | ||
|
@@ -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 protected]`. | ||
- 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,174 @@ | |
<link rel="stylesheet" href="./style.css"> | ||
</head> | ||
<body> | ||
<h1>HTML Form</h1> | ||
|
||
<form | ||
action="https://mate-academy-form-lesson.herokuapp.com/create-application" | ||
metod="post" | ||
> | ||
<fieldset class="rows"> | ||
<legend>Personal information</legend> | ||
|
||
<label class="form-field distance"> | ||
Surname: | ||
<input | ||
type="text" | ||
name="surname" | ||
autocomplete="off" | ||
> | ||
</label> | ||
|
||
<label class="form-field distance"> | ||
Name: | ||
<input | ||
type="text" | ||
name="name" | ||
autocomplete="off" | ||
> | ||
</label> | ||
|
||
<label class="form-field distance"> | ||
How old are You? | ||
<input | ||
type="number" | ||
name="number" | ||
min="1" | ||
max="100" | ||
value="12" | ||
> | ||
</label> | ||
|
||
<label class="form-field distance"> | ||
Full data of birth: | ||
<input | ||
type="date" | ||
name="birthday" | ||
> | ||
</label> | ||
|
||
<label class="form-field"> | ||
I accept the term of the agreement: | ||
<input | ||
type="checkbox" | ||
name="agreement" | ||
required | ||
> | ||
</label> | ||
|
||
</fieldset> | ||
|
||
<fieldset class="rows"> | ||
<legend>Registration</legend> | ||
|
||
<label class="form-field distance"> | ||
E-mail: | ||
<input | ||
type="email" | ||
name="email" | ||
placeholder="[email protected]" | ||
> | ||
</label> | ||
|
||
<label class="form-field"> | ||
Password: | ||
<input | ||
type="password" | ||
name="password" | ||
minlength="5" | ||
required | ||
> | ||
</label> | ||
|
||
</fieldset> | ||
|
||
<fieldset class="rows"> | ||
<legend>An interesting fact about you!</legend> | ||
|
||
<label class="form-field distance"> | ||
Do you love cats? | ||
<input | ||
type="radio" | ||
id="Yes" | ||
name="loveCat" | ||
> | ||
<label for="Yes">Yes</label> | ||
<input | ||
type="radio" | ||
id="No" | ||
name="loveCat" | ||
> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can move these inputs to labels |
||
<label for="No">No</label> | ||
</label> | ||
|
||
<label class="form-field distance"> | ||
What is your favorite color? | ||
<input | ||
type="color" | ||
name="color" | ||
> | ||
</label> | ||
|
||
<label class="form-field distance"> | ||
What time do you go to bed? | ||
<input | ||
type="time" | ||
name="go to bed" | ||
step="1" | ||
> | ||
</label> | ||
|
||
<div class="form-field distance"> | ||
<label for="cars"> | ||
What are your favorite brand of cars? | ||
</label> | ||
<select id="cars" | ||
name="cars" | ||
size="4" | ||
multiple> | ||
<option value="BMW">BMW</option> | ||
<option value="Audi">Audi</option> | ||
<option value="Lada">Lada</option> | ||
</select> | ||
</div> | ||
|
||
<label class="form-field"> | ||
How do you rate our work? | ||
<input | ||
type="range" | ||
name="rate" | ||
> | ||
</label> | ||
</fieldset> | ||
|
||
<fieldset class="rows"> | ||
<legend>Additional info:</legend> | ||
|
||
<label class="form-field distance"> | ||
Comments: | ||
<textarea></textarea> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Every field should have name attribute |
||
</label> | ||
|
||
<div class="form-field"> | ||
<label for="recommend"> | ||
Would you recommend us? | ||
</label> | ||
<select | ||
name="recommend" | ||
id="recommend" | ||
> | ||
<option value="yes">Yes</option> | ||
<option value="no">No</option> | ||
</select> | ||
</div> | ||
|
||
</fieldset> | ||
|
||
<button type="submit"> | ||
Submit | ||
</button> | ||
|
||
</form> | ||
|
||
<script type="text/javascript" src="./main.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
/* styles go here */ | ||
.form-field { | ||
display: block; | ||
} | ||
|
||
.distance { | ||
margin-bottom: 10px; | ||
} | ||
|
||
.rows { | ||
margin-bottom: 20px; | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need this label