Questions tagged [textfield]

A text field (or text box) is a user-interface control allowing the user to input text into a program.

A typical text field is a rectangle, often with a border. It can be either single-line or multi-line. In addition to typing, text fields allow for a variety of other activities, such as text selection (cut, copy, paste).

This GIF ("File:Textbox2.gif" on Wikimedia Commons) depicts a text field with text being entered:

A text field with the word 'Wikipedia' being typed in

4965 questions
96
votes
6 answers

How to detect live changes on TextField in SwiftUI?

I have a simple TextField that binds to the state 'location' like this, TextField("Search Location", text: $location) I want to call a function each time this field changes, something like this: TextField("Search Location", text: $location) { …
dylankbuckley
  • 1,507
  • 1
  • 13
  • 21
90
votes
4 answers

How to detect when a TextField is selected in Flutter?

I have a Flutter TextField which gets covered by the soft keyboard when the field is selected. I need to scroll the field up and out of the way when the keyboard is displayed. This is a pretty common problem and a solution is presented in this…
user2785693
  • 935
  • 1
  • 8
  • 7
88
votes
5 answers

Flutter: Outline input border

I was trying to build a border for my text field like: return TextField( ... border: OutlineInputBorder( borderSide: BorderSide( color: Colors.red, width: 5.0), ) ) ) But it always return a black border with 1.0 as width. The…
Little Monkey
  • 5,395
  • 14
  • 45
  • 83
85
votes
2 answers

Rails not editable text field

I have a form_for written in the following manner:
<%= location.label :city %> <%= location.text_field :city, :disabled=>true%>
<%= location.label :country %> <%= location.text_field…
Joe
  • 1,747
  • 3
  • 17
  • 24
84
votes
6 answers

Customizing Increment Arrows on Input of Type Number Using CSS

I have an input of type number that is rendered using the following code: It looks like this: I would like to turn it into something like…
MadPhysicist
  • 5,401
  • 11
  • 42
  • 107
78
votes
15 answers

Flutter TextField value always uppercase & debounce

I am new in Flutter. I am looking for TextField value to always uppercase but I did not find any resource on that. Another issue is the TextField onChanged event debounce implementation. When I type on TextField it immediately fires onChanged event…
Harun
  • 1,137
  • 1
  • 9
  • 7
76
votes
15 answers

How to add a TextField to Alert in SwiftUI?

Anyone an idea how to create an Alert in SwiftUI that contains a TextField?
Captain Vril
  • 781
  • 1
  • 5
  • 6
76
votes
9 answers

How can I limit the length of a text field input in flutter?

The TextField widget doesn't seem to have a "limit" attribute to limit the number of characters that can be typed. How I can enforce that only a certain number of characters can be provided as input in a TextField Widget. I tried looking at the…
Anonk
  • 1,473
  • 4
  • 13
  • 15
70
votes
16 answers

How do I remove content padding from TextField?

I am new to flutter and I am creating login form, for that I have used TextField and added prefix icon but I am getting some extra spaces in between textfields (user id and pin) and before the prefix icon. I have also tried InputDecorationTheme but…
Zubair Rehman
  • 2,335
  • 2
  • 20
  • 25
63
votes
2 answers

In Material UI when do we use Input vs. TextField for building a form?

Maybe this is just a basic question, but so far have not found any reasonable explanation. I am a beginner in React and using Material UI very recently. I am not very clear on when to use an Input vs. Textfield for building a form. Looking at the…
raghuvd
  • 665
  • 1
  • 5
  • 6
62
votes
9 answers

How to expand a textField in flutter looks like a text Area

When i tap in textField in landScape mode i would like to expand in full screen likes whatsapp TextFormField( keyboardType: TextInputType.number, decoration: InputDecoration( prefixIcon:…
Micael
  • 723
  • 1
  • 5
  • 7
62
votes
12 answers

Hide textfield blinking cursor

I have a textfield is there a way to hide the blinking text cursor? I say this because I am doing a horror/mystery website and one of the clues is to start typing anywhere. Maybe I can do it with javascript?
test
  • 17,706
  • 64
  • 171
  • 244
56
votes
2 answers

Change the default border color of TextFormField in FLUTTER

Unable to change the default border color when TextFormField is not active. When TextFormField is not active this shows DarkGrey-Border color. So, how to change that. Theme( data: new ThemeData( primaryColor:…
jazzbpn
  • 6,441
  • 16
  • 63
  • 99
55
votes
2 answers

focusing a text field in swift

I have 4 textfields on a register screen and i have it set up so that when the user presses next on each text field, the next text field is focused. Code below: func textFieldShouldReturn(textField: UITextField) -> Bool { if (textField ==…
user2363025
  • 6,365
  • 19
  • 48
  • 89
55
votes
6 answers

How to set the height of an input (text) field in CSS?

Sorry for this question but I can't seem to find an answer anywhere. I have CSS code that should set the height of my text box. I am using VS2010 Express for Windows phone, coding in HTML/CSS/Javascript/C#. HTML
Arrie
  • 1,327
  • 5
  • 18
  • 39