Questions tagged [input]

Input is usually related to user input, i.e., to the data that user supplies to a running application. In many systems this input is considered to be potentially dangerous and needs to be sanitized to ensure that the user has not injected runnable code into the application.

For questions pertaining to the HTML <input> tag, please use instead.

Input is any form of information that is provided to an application or process. In interactive graphical user interface (GUI) applications, input is often taken from the user via input controls such as textboxes and drop-down lists. In non-interactive services, input is often taken from local or remote resources, or service requests.

34931 questions
2071
votes
49 answers

Can't bind to 'ngModel' since it isn't a known property of 'input'

I have this simple input in my component which uses [(ngModel)] : And I get the following error when I launch my app, even if the component is not displayed. zone.js:461 Unhandled Promise…
Anthony Brenelière
  • 60,646
  • 14
  • 46
  • 58
1750
votes
11 answers

How to remove focus border (outline) around text/input boxes? (Chrome)

Can anyone explain how to remove the orange or blue border (outline) around text/input boxes? I think it only happens on Chrome to show that the input box is active. Here's the input CSS I'm using: input { background-color: transparent; …
Joey Morani
  • 25,431
  • 32
  • 84
  • 131
1272
votes
20 answers

Can I hide the HTML5 number input’s spin box?

Is there a consistent way across browsers to hide the new spin boxes that some browsers (such as Chrome) render for HTML input of type number? I am looking for a CSS or JavaScript method to prevent the up/down arrows from appearing.
Alan
  • 12,952
  • 3
  • 18
  • 13
1144
votes
13 answers

Is there a float input type in HTML5?

According to html5.org, the "number" input type's "value attribute, if specified and not empty, must have a value that is a valid floating point number." Yet it is simply (in the latest version of Chrome, anyway), an "updown" control with integers,…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
1053
votes
22 answers

Is there any way to change input type="date" format?

By default, the input type="date" shows date as YYYY-MM-DD. The question is, is it possible to force it's format to something like: DD-MM-YYYY?
Tural Ali
  • 22,202
  • 18
  • 80
  • 129
967
votes
46 answers

Removing input background colour for Chrome autocomplete?

On a form I'm working on, Chrome is auto-filling the email and password fields. This is fine, however, Chrome changes the background colour to a pale yellow colour. The design I'm working on is using light text on a dark background, so this really…
DisgruntledGoat
  • 70,219
  • 68
  • 205
  • 290
778
votes
21 answers

How to remove the border highlight on an input text element

When an HTML element is 'focused' (currently selected/tabbed into), many browsers (at least Safari and Chrome) will put a blue border around it. For the layout I am working on, this is distracting and does not look right.
user170579
  • 8,180
  • 6
  • 24
  • 21
745
votes
22 answers

Asking the user for input until they give a valid response

I am writing a program that accepts user input. #note: Python 2.7 users should use `raw_input`, the equivalent of 3.X's `input` age = int(input("Please enter your age: ")) if age >= 18: print("You are able to vote in the United States!") else: …
Kevin
  • 74,910
  • 12
  • 133
  • 166
704
votes
12 answers

HTML Input="file" Accept Attribute File Type (CSV)

I have a file upload object on my page: with the following excel files on my desktop: file1.xlsx file1.xls file.csv I want the file upload to ONLY show .xlsx, .xls, & .csv files. Using the accept attribute,…
Dom
  • 38,906
  • 12
  • 52
  • 81
633
votes
18 answers

Set the default value of an input field

How would you set the default value of a form text field in JavaScript?
SebastianOpperman
  • 6,988
  • 6
  • 30
  • 36
620
votes
12 answers

User input and command line arguments

How do I have a Python script that can accept user input and how do I make it read in arguments if run from the command line?
Teifion
  • 108,121
  • 75
  • 161
  • 195
560
votes
44 answers

How to set input type date's default value to today?

Given an input element: Is there any way to set the default value of the date field to today's date?
Ian Brown
  • 5,601
  • 3
  • 15
  • 4
474
votes
10 answers

Disable validation of HTML form elements

In my forms, I'd like to use the new HTML form types, for example (more info about the types here). The problem is that Chrome wants to be super helpful and validate these elements for me, except that it sucks at it. If it fails…
nickf
  • 537,072
  • 198
  • 649
  • 721
453
votes
7 answers

What does "for" attribute do in an HTML

I wonder what is the difference between the following two code snippets: and
jeff
  • 13,055
  • 29
  • 78
  • 136
445
votes
18 answers

Is there any way to prevent input type="number" getting negative values?

I want to get only positive values, is there any way to prevent it using only html Please don't suggest validation method
Tural Ali
  • 22,202
  • 18
  • 80
  • 129
1
2 3
99 100