Skip to main content

How to Add a Multi-Line Text Input in Power Apps

· 4 min read
Jagdish Kumawat
Founder @ Dewiride

For more than a line of text, such as a comment or a description, use the modern Text input control with Type set to Multiline. Give it room, a placeholder and an accessible label, and read what's typed from its Text.

Prerequisites​

The example is the Career Development Plan app's Response screen, where people write how they show a competency.

Step 1: Insert a Text Input​

Select where it should go, here the conBodyRS container, then Insert → Input → Text input. Rename it, for example txtResponseRS (txt is the prefix for text inputs in Microsoft's naming guidance).

In the example it started single-line, 320 by 32, with the placeholder Enter text.

Step 2: Make It Multi-Line​

Set Type:

txtResponseRS → Type
TextInputType.Multiline

The formula bar with the Type property of txtResponseRS set to TextInputType.Multiline and the preview strip reading TextInputType.Multiline = multiline

The other types are SingleLine (the default), Password and Search (Text Input modern control).

Step 3: Size and Words​

PropertyExample valueWhy
Height240Room for several lines
Placeholder"Write your response"A hint while it's empty
DefaultlocResponse.ResponseStarts with the saved text, if any
AccessibleLabel"Your response for " & locPlanItem.CompetencySays what to type, for screen readers

In a vertical container that stretches its children, the box takes the full width on its own (How to Add a Vertical Container in Power Apps).

The empty box in preview, with its placeholder:

The My response screen in preview with an empty grey text box showing Write your response, and 0 of 4,000 characters below it

Step 4: Read What's Typed​

Formulas read the typed text from Text:

Reading the value
txtResponseRS.Text

TriggerOutput is Keypress by default, so Text changes with every key, and anything that uses it, such as a character count, updates as you type. With a response typed in:

The same screen with a paragraph typed into the box, 247 of 4,000 characters below it, and the Send to manager button enabled

Common Mistakes​

MistakeWhat happensDo this instead
Leaving Type single-lineLine breaks aren't possibleTextInputType.Multiline
Reading Default instead of TextYou get the starting value, not what was typedRead txtX.Text
No AccessibleLabelScreen readers can't say what to typeDescribe the expected text

Troubleshooting​

SymptomLikely causeFix
The box keeps old text when the screen opensDefault didn't changeReset it in OnVisible
It's too small on a phoneA fixed heightCheck it at phone size and adjust Height

FAQ​

How do I limit the length?​

Use MaxLength (How to Limit Text Length and Show a Character Count in Power Apps).

How do I make it read-only?​

Set DisplayMode to DisplayMode.View (How to Make a Control Read-Only in Power Apps with DisplayMode).

Conclusion​

Insert Text input, set Type to TextInputType.Multiline, give it a height, a placeholder, a Default and an accessible label, and read the value from Text.

Additional Resources​

Stay Updated

Subscribe to our newsletter for the latest tutorials, tech insights, and developer news.

By subscribing, you agree to our privacy policy. Unsubscribe at any time.