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

23 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Truls Bjørneby
Truls Bjørneby
1 year ago

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

Tom
Tom
1 year ago

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

Jim
Jim
1 year 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
1 year 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
10 months ago

Any way to restrict entries to numbers only?

Audley
Audley
5 months 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
8 months ago

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

Glenn Bullion
Glenn Bullion
8 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
7 months ago

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

Preben
Preben
5 months ago

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

CPee
CPee
3 months ago

Hi,

I tried using the text input from modern control and set the value to thisitem.value & ” label name”. My problem is that whenever I saved the text input, the ” label name” adds up. Is there a way to incorporate the text input header name without it recurring?

Thank you.

Brian
Brian
2 months ago

How do I reset (blank) the test with a button “X”

Dave
Dave
18 days ago

When using a modern text input to search a gallery, has anyone else noticed that no results show in the gallery until the user interacts with the text input control. i.e. put in a space and then delete it. This then brings up all unfiltered results in the gallery. This does not happen with a classic text input. The ‘Value’ property is “”. Tried Blank()

Dave
Dave
18 days ago
Reply to  Dave

Also, it works just fine in the studio. Only once published it plays up

Dave
Dave
17 days ago
Reply to  Dave

Just in case someone reads this, I have got it to work by using a local variable

Sean Hodkinson
Sean Hodkinson
9 days ago

Hi Matthew, I am using the text input control and I am sure that yesterday the Onchange event was firing every time I typed a letter. Today onchange event is only triggering when I hit the tab key or click somewhere else. Any ideas why the behaviour is different today than yesterday?

Thanks,
Seán

Sean Hodkinson
Sean Hodkinson
9 days ago

Hi Matthew,

Well what do you know, there’s a new property called ‘TriggerOutput’. It must have got added last night. There are 3 different states:

FocusOut: Triggers OnChange only when the text input control loses focus.

Delayed: Triggers OnChange after a half-second delay. Useful for delaying expensive operations until user completes inputting text (i.e. for filtering when input is used in other formulas).

Keypress: Triggers OnChange immediately as the user types.

Thanks,
Seán

Phil Slater
Phil Slater
7 days ago
Reply to  Sean Hodkinson

thanks for this, I had noticed that things were not working as they had previously and now I know why 😉

Frank
Frank
9 days ago

What is doing the property “Appearance” and what are the possibilities of states? Thx