-
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 Form #780
base: master
Are you sure you want to change the base?
add Form #780
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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://RendyDm.github.io/layout_html-form/) | ||
- [TEST REPORT LINK](https://RendyDm.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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,175 @@ | |
</head> | ||
<body> | ||
<h1>HTML Form</h1> | ||
|
||
<form action="https://mate-academy-form-lesson.herokuapp.com/create-application" | ||
method="post" | ||
autocomplete="off" | ||
> | ||
|
||
<fieldset class="form-set"> | ||
<legend>Personal information</legend> | ||
|
||
<label class="form-field"> | ||
Surname: | ||
<input | ||
type="name" | ||
name="surname" | ||
minlength="5" | ||
maxlength="12" | ||
required | ||
tabindex="1" | ||
> | ||
</label> | ||
|
||
Comment on lines
+26
to
+35
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. |
||
<label class="form-field"> | ||
Name: | ||
<input | ||
type="name" | ||
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. Change the input type from 'name' to 'text' for the Name field 🧐 |
||
name="name" | ||
required | ||
tabindex="2" | ||
> | ||
</label> | ||
|
||
<label class="form-field"> | ||
How old are You?: | ||
<input | ||
type="number" | ||
name="age" | ||
min="1" | ||
max="100" | ||
value="12" | ||
required | ||
tabindex="3" | ||
> | ||
</label> | ||
|
||
<label class="form-field"> | ||
Full data of birth: | ||
<input | ||
type="data" | ||
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. Change the input type from 'data' to 'date' for the Full data of birth field 📅 |
||
name="birth" | ||
placeholder="mm/dd/yyyy" | ||
tabindex="4" | ||
required | ||
> | ||
</label> | ||
|
||
<label for="terms-and-conditions" class="form-field"> | ||
I accept the term of the agreement | ||
<input | ||
type="checkbox" | ||
name="terms" | ||
> | ||
</label> | ||
|
||
</fieldset> | ||
|
||
<fieldset class="form-set"> | ||
<legend>Registration</legend> | ||
|
||
<label class="form-field"> | ||
Email: | ||
<input | ||
type="email" | ||
name="email" | ||
placeholder="[email protected]" | ||
tabindex="5" | ||
required | ||
> | ||
</label> | ||
|
||
<label class="form-field">Password: | ||
<input | ||
type="Password" | ||
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. Change the input type from 'Password' to 'password' for the Password field 🔒 |
||
name="Password" | ||
minlength="5" | ||
maxlength="12" | ||
tabindex="6" | ||
required | ||
> | ||
</label> | ||
</fieldset> | ||
|
||
<fieldset class="form-set"> | ||
<legend>An interesting fact about you?</legend> | ||
|
||
<div class="form-field"> | ||
<label>Do you love cats? | ||
<input | ||
type="radio" | ||
name="question" | ||
>Yes | ||
<input | ||
type="radio" | ||
name="question" | ||
>No | ||
</label> | ||
</div> | ||
Comment on lines
+109
to
+120
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. cover each input in a separate label to avoid this behavior Screen.Recording.2023-04-26.at.09.46.21.mov |
||
|
||
<label class="form-field"> | ||
What is your favorite color? | ||
<input | ||
type="color" | ||
name="color" | ||
value="#000000" | ||
> | ||
</label> | ||
|
||
<label for="appt" class="form-field"> What time do you go to bed? | ||
<input | ||
type="time" | ||
name="appt" | ||
required | ||
> | ||
</label> | ||
|
||
<div class="form-field"> | ||
<label> What are your favorite brand of cars? | ||
<select name="Cars" multiple> | ||
<option>BMW</option> | ||
<option>Audi</option> | ||
<option>Lada</option> | ||
</select> | ||
</label> | ||
</div> | ||
|
||
<div class="form-field"> | ||
How do you rate our work? | ||
<input type="range" | ||
id="volume" | ||
name="volume" | ||
min="0" | ||
max="11" | ||
> | ||
<label for="volume"></label> | ||
</div> | ||
|
||
</fieldset> | ||
|
||
<fieldset class="form-set"> | ||
|
||
<legend>Additional info</legend> | ||
|
||
<label class="form-field"> | ||
Comments: | ||
<textarea name="feedback"></textarea> | ||
</label> | ||
|
||
<label class="form-field"> | ||
Would you recommend us? | ||
<select name="recommend_us"> | ||
<option value="yes">Yes</option> | ||
<option value="no">No</option> | ||
</select> | ||
</label> | ||
|
||
</fieldset> | ||
|
||
<button type="submit">Submit</button> | ||
</form> | ||
<script type="text/javascript" src="./main.js"></script> | ||
|
||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
/* styles go here */ | ||
.form-field { | ||
display: block; | ||
margin-bottom: 10px; | ||
} | ||
|
||
.form-set { | ||
margin-bottom: 20px; | ||
} |
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.
Change the input type from 'name' to 'text' for the Surname field 🧐