Friday, October 9, 2015

InfoPath 2013 Forms - Auto Expanding Text Fields

Goal

Create a text field that is self-expanding, either plain text or rich text fields.

Plain text

  • Right click on the control and select Text Box Properties .
  • Under the "size" tab, located height and set to "auto"


If you set it to be "50" which is the default, it will use scroll bars after the height is reached

So far, in Microsoft Edge - plain text boxes are not working correctly.  You hit "enter" and it doesn't go to the next row.   If you switch to Internet Explorer, then it works.

Rich Text

  • Size does NOT have to be changed for Rich Text, so you don't have to have the skinny one line boxes as you do with plain text

Issue 1 - Toolbar is required

You must have the "Show InfoPath commands in Ribbon or Toolbar" option selected.
  • Go to "File" and "Advanced form options"
  • Select "Category"
  • Make sure the "Show InfoPath Commands in Ribbon or toolbar" is selected

If the toolbar is not turned on, Chrome and Microsoft Edge will revert back to plain text.  IE will let you use rich text, but will not auto-expand.

Issue 2 - Enhanced rich text must be enabled

Another requirement is to have "Enable enhanced rich text content such as tables, images and hyperlinks" selected under Display properties for the Rich Text control.


 
Without this installed, you still do not get auto-expanding fields.