Questions tagged [input-field]

The `` tag specifies an input element. `input` elements are used within a `form` element to declare input controls that allow users to input data. An input control can vary depending on its `type` attribute.

The <input> tag specifies an input field where the user can enter data.

<input> elements are used within a <form> element to declare input controls that allow users to input data.

An input field can vary in many ways, depending on the type attribute


Browser Support

CHROME IE FF SAFARI http://www.w3schools.com/images/compatible_safari.gif OPERA


Tips and Notes

Note: The <input> element is empty, it contains attributes only.

Tip: Use the <label> element to define labels for <input> elements.


Type Attribute Values

button

Defines a clickable button (mostly used with a JavaScript to activate a script)


checkbox

Defines a checkbox


color

Defines a color picker

HTML5


date

Defines a date control (year, month and day (no time))

HTML5


datetime-local

Defines a date and time control (year, month, day, hour, minute, second, and fraction of a second (no time zone)

HTML5


email

Defines a field for an e-mail address

HTML5


file

Defines a file-select field and a Browse... button (for file uploads)


hidden

Defines a hidden input field


image

Defines an image as the submit button


month

Defines a month and year control (no time zone)

HTML5


number

Defines a field for entering a number

HTML5


password

Defines a password field (characters are masked)


radio

Defines a radio button


range

Defines a control for entering a number whose exact value is not important (like a slider control)

HTML5


reset

Defines a reset button (resets all form values to default values)


search

Defines a text field for entering a search string

HTML5


submit

Defines a submit button


tel

Defines a field for entering a telephone number

HTML5


text

Default. Defines a single-line text field (default width is 20 characters)


time

Defines a control for entering a time (no time zone)

HTML5


url

Defines a field for entering a URL

HTML5


week

Defines a week and year control (no time zone)

HTML5


Refers From :

  1. http://www.w3schools.com/tags/tag_input.asp
  2. http://www.w3schools.com/tags/att_input_type.asp
465 questions
0
votes
1 answer

How to show incorrect/correct inputfield by backgroundcolour from jQuery to HTML

I have to make a patientsform (made in HTML) and ask a few personal questions. For example: a patient number. I have used an input field where someone can type their number. The number has to be exactly 8 numbers. If this is true, the input field…
0
votes
1 answer

HTML input field border smaller than div that contains it

I am struggeling with a problem. My input field border (when typing) is smaller than the div field (the border is just as big as the placeholder), as you can see on the picture below. The css code for the input field is the…
0
votes
1 answer

CSS Width and Overlap

I want to inherit the width of my suggestion div from the input field's width and at the same time overlap it from the objects. My CSS below overlaps but does not inherit the width of the input field. I've tried making it to 100% but it becomes…
Char
  • 2,073
  • 8
  • 28
  • 45
0
votes
0 answers

I want the form fields in two columns

Below given the code and image of it's current result. I want the inputs to be display in two columns but i'm unable to do that. Thanks in advance ... ...

0
votes
2 answers

How to concatenate some read-only text at the end of the text box?

How to make only some text in a text-box read-only while allowing the rest to be edited. I'm trying to make a text box that allow user to input text and then there is some read-only text (non-editable) at the end of the text box. How can I do this…
0
votes
1 answer

Is it possible to control the uncontrollable input text? - React

I set the input texts values from state when the user select an item from SelectField dropdown menu of Material UI library but when it sets, the input texts become unchangeable and what I need is that when the Here is the image; (Before selecting…
Burak ULU
  • 305
  • 1
  • 6
  • 17
0
votes
4 answers

jQuery how to declare variable outisdie function and use in function

I need your help. I want to declare input field in variable outside function and the variable should work in function: for example var name = $("#name").val(); function _testAlert() { alert(name); }
Muhammad Kazim
  • 611
  • 2
  • 11
  • 26
0
votes
1 answer

ionic 1 how to trigger input filed first to enter value

I am using ionic 1. In that i have one screen with two input fields. So whenever user come to that screen. My very first input field should automatically trigger and user have to type the value. means that ...! When ever user come to my screen , it…
venky
  • 139
  • 4
  • 12
0
votes
0 answers

.net case insensitive string validation on field

Is there any way I could validate email against case insensitive mode. I could not use (?i) since it will throw me an exception on jquery. I want examples to work not only with a@gmail.co.uk, but also a@Gmail.co.uk. Current regex looks like this…
ProgLearner
  • 171
  • 2
  • 15
0
votes
1 answer

Setting disabled for Bootstrap filestyle input is not working in javascript

I wanted to disable the input using the following code that is called when a button is pressed using Bootstrap FileStyle(for reference I used this link Link to the documentation ): function disableInput(e) { $(":file").filestyle({disabled:…
0
votes
1 answer

Bootstrap 3 - Use "Refresh" Glyphicon to Reset Text Input Field

How do I reset an input field by clicking on a "refresh" glyphicon in Bootstrap 3? Existing HTML:
Jen
  • 156
  • 1
  • 3
  • 17
0
votes
1 answer

MSDOS style Input field in python

I'm hoping someone can help... I'm looking to create an input field that goes over dots in PYTHON... heres and example in MSDOS https://upload.wikimedia.org/wikipedia/en/3/3b/Norton_Utilities_6.01_UI.png Please look at the top input field file…
0
votes
1 answer

Jquery plugin to validate

I want to use a validation plugin that is able to validate input with the form attribute outside of a form. JQuery validation plugin does not seem to support this, so I was wondering if anyone else knows one that does support this…
Tibout
  • 23
  • 1
  • 9
0
votes
1 answer

Set value on readonly input field Contact Form 7 WordPress

I have a readonly input field in my contact form created using contact form 7. I need to set the page title () as the value on that readonly input. My readonly input as follows. [text* selected-package readonly id:selectedPackage…
WP Learner
  • 788
  • 1
  • 13
  • 34
0
votes
2 answers

write variable to input field

I am trying to set the value of an input field to the value of a utm_parameter from the url I have this code in the head of the page to extract the values of the parameters and set the value of the fields