Power Apps Text Input – Modern Controls


Purpose

A Power Apps text input control lets users enter text or data into a form or field. Its purpose is to enable user input, such as filling out a form or searching a table.


Properties

AccessibleLabel
Screen readers will voice this text when a user selects the control
ContentLanguage
Describes the language used to the audience (e.g. “en-US”)
DelayOutput
When true, wait until the user stops typing to update the Value output property
DisplayMode
Selects the mode: Edit, View or Disabled. In Edit mode the user can input values. In View mode the user can only see the values and in Disabled mode the control is greyed-out.

Options:
= DisplayMode.Disabled
= DisplayMode.Edit
= DisplayMode.View
Height
Distance from the top of the control to the bottom
Mode
Switch between single-line entry mode and multi-line entry mode

= “SingleLine”



= “Multiline”

OnChange
Actions that will be executed when the Value property of the Text Input Canvas changes
Required
Unknown purpose
Value
Initial value displayed in the control before the user interacts with it. Can also be used as an output property to get the current value of the Text Input Canvas.
Visible
Determines whether to show (true) or hide (false) the control
Width
Distance from the left side of the control to the right side
X
Distance from the left edge of the screen to the left side of the control
Y
Distance from the top edge of the screen to the top of the control




How To Use The Power Apps Text Input Control

1. Set the initial value of the text input using the Default property.

"Lorem ipsum dolor"



2. Write some new text in the Text Input.



3. Get the current text input value using this code.

TextInputCanvas1.Value






Questions?

If you have any questions or feedback about Power Apps Text Input – Modern Controls please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion.

Subscribe
Notify of
guest

14 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Truls Bjørneby
Truls Bjørneby
10 months ago

Any idea, how to change font size in Text Input control?

Tom
Tom
9 months ago

FYI – Required = Simply makes the border red if no data is within

Jim
Jim
9 months ago

His “tip” is not true. Just tested and it does not highlight the input control when I tab off the control, while the “required” property is true and the control is empty.

Glen
Glen
9 months ago

Is there a way to trigger actions OnSelect as well as when you take focus away from the textbox?

For example, I want to set a variable when a textbox gets selected. But let’s say the user does nothing to ‘Change’ the text and clicks focus away from it. that is where I want to trigger updating the variable with a different state.

Edirin
Edirin
6 months ago

Any way to restrict entries to numbers only?

Audley
Audley
1 month ago
Reply to  Edirin

Try setting the OnChange property to something like this. Assuming the default value is blank.
If(
    !IsMatch(txtActualJobDuration.Value, “[^0-9]*”),
    txtActualJobDuration.Value,
    Reset(txtActualJobDuration)
)

Adam
Adam
5 months ago

Is there a way to clear the text with other button? like reset to “”.

Glenn Bullion
Glenn Bullion
5 months ago

It seems the OnChange for the modern text control is a little wonky. The OnChange happens as the user types, and not when the control changes, which is pretty much breaking the app I’m working on. It pains me to have to shift every control back to classic, but might have to do so.

SeekerShan
SeekerShan
4 months ago

Hi, Is there any way to change the alignment of Text input

Preben
Preben
2 months ago

Do you know anything about this property…?
‘TextInputCanvas.Type’.Search