Help to add two kinds of Input Type Attribute , There are date and fi… (#29932)

* Help to add two kinds of Input Type Attribute , There are date and file input type.

* Capitalization
This commit is contained in:
Tedo Haris Chandra
2019-03-10 22:27:05 +07:00
committed by The Coding Aviator
parent 95aacb6c02
commit ce03b5ccdc

View File

@ -41,6 +41,24 @@ Allow only numeric input. You can also specify the min and max value allowed. Th
</form>
```
### date
Create input fields that let the user enter a date , either using a text box that automatically validates the content, or using a special date picker interface .
```html
<form>
<label for="date">Date:</label>
<input type="date" name="date">
</form>
```
### file
Let the user choose one or more files from their device storage. Once chosen, the files can be uploaded to a server using form submission
```html
<form>
<label for="photo">Profile Picture:</label>
<input type="file" name="photo">
</form>
```
### radio
Only one option can be selected by the user. The group of radio buttons needs to have the same name attribute. You can select automatically one option by using `checked` property (in the example below the value Blue is selected).
```html
@ -50,6 +68,7 @@ Only one option can be selected by the user. The group of radio buttons needs to
<label><input type="radio" name="color" value="blue" checked>Blue</label>
</form>
```
### checkbox
A user can select zero or more options from the group of checkboxes. You can use `checked` property here too for one or more options.
```html
@ -59,6 +78,7 @@ A user can select zero or more options from the group of checkboxes. You can use
<label><input type="checkbox" name="lang" value="french">French</label>
</form>
```
### button
The input is displayed as a button, the text which should be displayed in the button is in the value attribute.
```html
@ -66,6 +86,7 @@ The input is displayed as a button, the text which should be displayed in the bu
<input type="button" value="click here">
</form>
```
### submit
Displays the submit button. The text which should be displayed in the button is in value attribute. After clicking on the button, the HTML does the validation and if it passes, the form is submitted.