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
3 answers

List selector like AB Contact edit phone/email type

I am trying to create a very similar to Contact Edit functionality with similar abilities to select and create a new label for an item. One option is to use UIActionSheet, but this would not allow for ability to add a new item, and no check…
kos
  • 1,357
  • 9
  • 21
0
votes
1 answer

Javascript set value of input field not lasting

Working on a blackjack game for a class and having some trouble with the display function. It does change the value of the field but then it reverts back after the function is done. How do I make the change last?
0
votes
2 answers

condition for input field and checkbox

how can i create a condition for multiple checkbox! Input Field ID =" INsrvOtr " CheckBox ID = "INsrv" let's say that the that the user has two options,either put a value on the input field or choose any value from the checkbox but he can only…
telexper
  • 2,381
  • 8
  • 37
  • 66
0
votes
1 answer

WebDriver's sendKeys() method does not fill out "(" in input-field when using Firefox 14

I'm using webdriver to fill out a input-field and for some reason all text is inserted but "(". findElementById("elementId").sendKeys("This is a text"); -> This is a text findElementById("elementId").sendKeys("method().getName()"); ->…
0
votes
0 answers

CakePHP ajaxupload with Uploader

I want to upload multiple pictures using this CakePHP-Plugin, which I use to attach uploads to the model: http://milesj.me/code/cakephp/uploader Unfortunately the documentation isn't very helpful on this. My plan is to submit the files one by one to…
hugo der hungrige
  • 12,382
  • 9
  • 57
  • 84
0
votes
1 answer

Jquery validation Put Validation Error Inside Input field value

I'm trying to override the validation on jquery to put it inside the form input value (due to the fact that my form does not have space to put it to the side ) is a side panel form.. hence, i want it to show inside the form for hte validation error,…
Santiago Berniz
  • 37
  • 1
  • 11
-1
votes
1 answer

How do I display any number of input text field on a modal depending on number of element in an array

Hello i'm new to ReactJS and Javascript. How do I display any number of textbox (input field, text input) on a modal, depending on the number of words that are in a sentence? For example because there a 5 words in "Hope you are doing great", the…
-1
votes
2 answers

How to put icon inside an input box

Can anyone help me to put the tick icon inside the input box at right corner? Also is it possible to display a 'Field Saved' message along with the tick icon? Update: What if form contains multiple input in single row, then how to show icon inside…
Sanad Qazi
  • 23
  • 1
  • 4
-1
votes
1 answer

Align Icon to The Right of an Input Field No Matter Width

I have three input fields, each with a set width, and want an icon aligned to the right of each. Right now, it appears it's aligning to the right of the parent container. Take a look at this codepen to see what I mean. .input-container { width:…
Eric Nguyen
  • 926
  • 3
  • 15
  • 37
-1
votes
1 answer

Trying to get a InputField input as a Int in Unity

So basically, an user is gonna type in the hours in a inputfield and im gonna get the amount they write as an int in my code. public InputField hours, minutes; public int wantedHours, wantedMinutes; Basically what i want is that people are gonna…
-1
votes
1 answer

How do I clear the input field after I press enter?

I have this section of code for a todo list and when I press Enter I want to clear the text in the input field. Any idea how to do this? document.addEventListener("keyup", function (event) { if (event.key === 'Enter') { var inputText =…
-1
votes
1 answer

How to make questions displayed one-by-one after answered and clicked to Play button

I am new in Unity, and try to make questions displayed one-by-one after answered and clicked to the Play button public class PlayGame : MonoBehaviour { public string[] questions = {"What is 10+10", "What is 20+20", "What is 30+30", "What is…
Tanguy MP
  • 135
  • 9
-1
votes
2 answers

How can I increase value of an input field?

Something that has bugged me for a while and always giving me headaches. I have an input field with a value in numbers I am picking up the value of the…
Djongov
  • 195
  • 2
  • 13
-1
votes
1 answer

What could cause PlayerPrefs to not save a string?

I have the below code. What could possibly make this not work? Other PlayerPrefs seem to work fine. The log always shows that it restores "" and yet it always saves my actual text. EDIT: I've just discovered that my "OnDisable" code is being called…
CodeMonkey
  • 1,795
  • 3
  • 16
  • 46
-1
votes
5 answers

how to write a code of show and hide password input field

In this question there are the following answers of this question but i give the best answer of this question. function myFunction() { var data = document.getElementById("myInput"); if (data.type === "password") { …
Siraj Ahmed
  • 128
  • 2
  • 6
1 2 3
30
31