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
1
vote
1 answer

React-aria | typescript error on input/ textfield

I would like to work with react-aria. Unfortunately I don't get this far. I followed the documentation (https://react-spectrum.adobe.com/react-aria/useTextField.html) but this Error pops up on the input Element. Hope somebody can help…
nuje
  • 43
  • 3
1
vote
1 answer

How to paste number in separate text fields by material ui?

I'm using material-ui in my react project. I wanna copy a number and paste in multiple text fields. const [otpArr, setOtpArr] = useState(['', '', '', '', '', '']) let inputRefs = useRef([React.createRef(),…
Banafshe Alipour
  • 1,041
  • 4
  • 12
  • 27
1
vote
2 answers

How to limit number of decimals in textfield when user input is from pasteboard, iOS Swift

I have a textfield where user can input only 6 decimals, if there are decimals, if there aren't then he is allowed to input as many characters as user wants. For example, I am allowing this: 7472828282 and this: 0,123456, not this:…
miki
  • 75
  • 9
1
vote
1 answer

Moving an icon into a TextField `leading` icon

as you can see in the picture, when we press the search icon, I want the icon to pass into the textfield. Basically, when I press the search icon, I want that icon to disappear into the textfield. Thank you for your help. Before After return…
1
vote
1 answer

Getting null value for _getVin.text

In the following code, I have implemented a textfield and its value will be stored by _getVin. But I am receiving null value before user is able to enter a value. So what will be a correct solution ? What are the changes to be made? @override …
ashish rana
  • 185
  • 7
1
vote
1 answer

Text fields from array in Rails

I'm trying to generate a set of text fields for an array using Rails 2.3. I have an array in my controller (which is not part of the model), and I'd like to make a text field for each entry. The array is like: @ages = [1, 3, 7] # defaults Then, I'd…
Taj Morton
  • 1,588
  • 4
  • 18
  • 26
1
vote
1 answer

Prevent background from scrolling when using keyboard in Flutter

I would like to have background scroll to focus the Textfield, but have the background image maintain it's position/aspect ratio. What I have tried: Wrapped my Scaffold in a Container with a BoxDecoration containing the background image Wrapped my…
Sam Doggett
  • 248
  • 5
  • 8
1
vote
2 answers

How i can do textField accepts only character "N or E" in Java?

How i can do textField accepts only letter "N or E" in Java? doesn't accept number and another characters. textField.textProperty().addListener((observable, oldValue, newValue) -> { if (newValue.length() > 1)…
Aziz
  • 13
  • 2
1
vote
1 answer

Using TextField hides the ScrollView beneath it in VStack

This view hold a list of pdf names which when tapped open webviews of pdf links. The view has a search bar above the list which when tapped causes the scrollview to disappear. struct AllPdfListView: View { @Environment(\.presentationMode) var…
1
vote
1 answer

Name-Field in SwiftUI

How can you make a TextField, that knows it's a Name-Field? I need the Phone to suggest the User His Name when he taps my TextField. Any ideas how to do that in SwiftUI? Thanks for your help! Boothosh
Boothosh81
  • 387
  • 1
  • 5
  • 24
1
vote
0 answers

Jetpack compose: Bug with Textfield extract mode

I am developing an Android application with Jetpack compose, and I noticed that on screens with little vertical space, the textfield components switch to "full screen" over the keyboard (extract mode). So far the behavior is normal, however the…
Anthony
  • 11
  • 1
1
vote
2 answers

How to show country code in the container

I'm working on phone number textfield, so for i got this package, and i want its CustomDecoration style, but i'm not getting it. here is my code. Widget phonetextformfieldCustomwithouticon(context, width, controller, height) { return Container( …
TimeToCode
  • 1,458
  • 3
  • 18
  • 60
1
vote
1 answer

Q: Bug on Form and TextField [SwiftUI]

When I use TextField in Form, the correct value is not displayed until tap the field. The name field is initially displayed dummy and change to shuji when tapped. If I change Form to VStack, initial value is displayed. ContentView.swift import…
1
vote
1 answer

MDL floating label textfields: forcing the label to float

This HTML file is supposed to write "New text" into the the textfield when the "ADD TEXT" button is clicked. Does anyone know how to make it so that the label of the textfield floats when the button is clicked on, as opposed to doing…
Ken Ely
  • 191
  • 7
1
vote
2 answers

Error 1009 in AS3

I have TextField instance called inputWord which contains no text on the first frame. On the same frame, on the actions layer, any time when I refer to inputWord in any way, there is an error: TypeError: Error #1009: Cannot access a property or…
nicks
  • 2,161
  • 8
  • 49
  • 101