-
Notifications
You must be signed in to change notification settings - Fork 608
HTMLform #803
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
base: master
Are you sure you want to change the base?
HTMLform #803
Changes from 1 commit
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 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -11,7 +11,145 @@ | |||||||||||||||||||||
| <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="field"> | ||||||||||||||||||||||
| <legend>Personal information</legend> | ||||||||||||||||||||||
| <label class="form"> | ||||||||||||||||||||||
| Surname: | ||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="text" | ||||||||||||||||||||||
| name="surname" | ||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| <label class="form"> | ||||||||||||||||||||||
|
Comment on lines
+28
to
+30
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. Don't forget to add empty lines between multiline sibling blocks of HTML. Fix it everywhere
Suggested change
|
||||||||||||||||||||||
| Name: | ||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="text" | ||||||||||||||||||||||
| name="name" | ||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| <label class="form"> | ||||||||||||||||||||||
| How old are you? | ||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="number" | ||||||||||||||||||||||
| name="age" | ||||||||||||||||||||||
| value="12" | ||||||||||||||||||||||
| min="1" | ||||||||||||||||||||||
| max="100" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| <label class="form"> | ||||||||||||||||||||||
| Full date of birth: | ||||||||||||||||||||||
| <input type="date" name="date"> | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| <div class="form"> | ||||||||||||||||||||||
|
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. This |
||||||||||||||||||||||
| <label for="termsOfAgreement"> | ||||||||||||||||||||||
| I accept the terms of the agreement | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="checkbox" | ||||||||||||||||||||||
| name="terms" | ||||||||||||||||||||||
| id="termsOfAgreement" | ||||||||||||||||||||||
| required | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </fieldset> | ||||||||||||||||||||||
| <fieldset class="field"> | ||||||||||||||||||||||
| <legend>Registration</legend> | ||||||||||||||||||||||
| <label class="form"> | ||||||||||||||||||||||
| E-mail: | ||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="email" | ||||||||||||||||||||||
| name="email" | ||||||||||||||||||||||
| placeholder="email@example.com" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| <label class="form"> | ||||||||||||||||||||||
| Password | ||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="password" | ||||||||||||||||||||||
| name="password" | ||||||||||||||||||||||
| minlength="5" | ||||||||||||||||||||||
| maxlength="10" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| </fieldset> | ||||||||||||||||||||||
| <fieldset class="field"> | ||||||||||||||||||||||
| <legend>An interesting fact about you!</legend> | ||||||||||||||||||||||
| <label class="form"> | ||||||||||||||||||||||
| Do you love cats? | ||||||||||||||||||||||
| <label> | ||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="radio" | ||||||||||||||||||||||
| name="catLover" | ||||||||||||||||||||||
| value="yes" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| Yes | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| <label> | ||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="radio" | ||||||||||||||||||||||
| name="catLover" | ||||||||||||||||||||||
| value="no" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
|
Comment on lines
+96
to
+105
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. Check the code style here
Suggested change
|
||||||||||||||||||||||
| No | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| <label class="form"> | ||||||||||||||||||||||
| What is your favorite color? | ||||||||||||||||||||||
| <input type="color" name="color"> | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| <label class="form"> | ||||||||||||||||||||||
| What time do you go to bed? | ||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="time" | ||||||||||||||||||||||
| name="bedtime" | ||||||||||||||||||||||
| step="2" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| <label class="form"> | ||||||||||||||||||||||
| What are your favourite car brands? | ||||||||||||||||||||||
| <select name="carBrans" multiple > | ||||||||||||||||||||||
| <option value="BMW">BMW</option> | ||||||||||||||||||||||
| <option value="Audi">Audi</option> | ||||||||||||||||||||||
| <option value="Lada">Lada</option> | ||||||||||||||||||||||
| </select> | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| <label class="form"> | ||||||||||||||||||||||
| How do you rate our work? | ||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="range" | ||||||||||||||||||||||
| name="rateOurWork" | ||||||||||||||||||||||
| min="0" | ||||||||||||||||||||||
| max="10" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| </fieldset> | ||||||||||||||||||||||
| <fieldset class="field"> | ||||||||||||||||||||||
| <legend>Additional info:</legend> | ||||||||||||||||||||||
| <label class="form"> | ||||||||||||||||||||||
| Comments: | ||||||||||||||||||||||
| <textarea | ||||||||||||||||||||||
| name="feedback" | ||||||||||||||||||||||
| rows="2" | ||||||||||||||||||||||
| cols="20" | ||||||||||||||||||||||
| ></textarea> | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| <label class="form"> | ||||||||||||||||||||||
| Would you recommend us? | ||||||||||||||||||||||
|
Comment on lines
+154
to
+155
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.
Suggested change
|
||||||||||||||||||||||
| <select name="recommend" required > | ||||||||||||||||||||||
| <option value="yes" selected >Yes</option> | ||||||||||||||||||||||
| <option value="no">No</option> | ||||||||||||||||||||||
| </select> | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| </fieldset> | ||||||||||||||||||||||
| <button type="submit">Submit</button> | ||||||||||||||||||||||
| </form> | ||||||||||||||||||||||
| </body> | ||||||||||||||||||||||
| </html> | ||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,13 @@ | ||
| /* styles go here */ | ||
| .field { | ||
| display: block; | ||
| margin-bottom: 20px; | ||
| } | ||
|
|
||
| .form { | ||
| display: block; | ||
| margin-bottom: 10px; | ||
| } | ||
|
|
||
| .form:last-child { | ||
| margin-bottom: 0; | ||
| } |
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.