Text input control in Power Apps
The Text input control is a box which let the users can type text, numbers, and other data.
The Text input control has the following properties: 1. Default The Default property specifies the initial value of a control before it is changed by the user. The Default property value is “Text input”. 2. Text The Text property of the control specifies the text that appears on a control or that the user types into a control. 3. DelayOutput The formulas that reference the text input control as an input, the formulas are executed for every keystroke on the text input control. When the DelayOutput property of the control is set to true, user input is registered after user pause in inputting the data in the control. It is useful for reducing the function calls for every keystroke, calls the function only when the user takes a pause in inputting text, this reduces the number of function calls and improve the app performance. 4. Size The Size property specifies the font size of the text that appears on a control. 5. Visible The Visible property specifies whether a control appears or is hidden. 6. HintText The HintText property of the control specifies the light-grey text that appears in an input-text control if it's empty.
7. X The X property of a control specifies the distance between the left edge of a control and the left edge of its parent container (screen if no parent container).
8. Y The Y property of a control specifies the distance between the top edge of a control and the top edge of the parent container (screen if no parent container).
9. Format The Format property specifies whether the user input is restricted to numbers only or can be any text.
10. Mode The control is in SingleLine, MultiLine, or Password mode.
11. Clear The Clear property of a control specified whether a Text-input control shows an "X" that the user can tap or click to clear the contents of that control. By default, the Clear property value is false.
Example:Step 1: Click on the + Insert at the top of the command bar or click on + icon on the left-hand side in the Power apps studio.
Step 2: The Text input control is added to the screen.
Step 3: Clear the default value in the control, i.e., set to “”. And add the HintText to “Enter your name”.
Step 4: By default, the mode is set to SingleLine.
Step 5: By default, the Clear property value is false.
Set the property value to true.
Step 6: Preview the app and write something in the text input control. The X sign is shown in the control when the Clear property is set to true.
When we click on the X sign the control value is cleared as shown in the following image.