I have a multiline field in an Infopath form that when opened in Chrome, does not wrap the text. It continues on as a long single line with a scroll bar. I checked the same form in Internet Explorer and it functions properly.

Is there some setting I need to enable to make the MultiLine text box work as intended?

  1. Upload a new css file to the “Style Library”. File should contain the following:
textarea { white-space: pre-wrap !important; word-wrap: break-word !important; }
  1. Go to Site Settings – Look and Feel – Master Page

  2. Set the Alternate CSS URL to point to the new CSS file that was added to the “Style Library”

  3. Make sure to check “Reset all subsites…..”

  4. Save and issue should be resolved for both Chrome and Firefox

  • 2
    This worked well for me, however I added a bit more speceficity to my css so that it would only affect Chrome. My rule looked like this @supports (-webkit-appearance:none) { textarea[scriptclass="TextBox"][wrapped="true"] { white-space: pre-wrap !important; word-wrap: break-word !important; } }
    – Pat
    Jan 13 '17 at 16:25

If the InfoPath form is embedded to a SharePoint page - you can add a Script Editor webpart and add this line of code to it and it should work for Chrome & IE.
enter image description here


The InfoPath form is being rendered on page such as: http://serverName/_layouts/FormServer.aspx. This page locates at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\FormServer.aspx. We need to inject the below CSS code in the header section of the page, to force the textarea automatically wrap regardless.

style type="text/css" textarea{white-space: pre-line !important;} /style

Same code to be added into C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\PrinLoader.FormServer.aspx, so that the print view will behave the same way.


InfoPath word-wrap fixer Chrome extension automatically injects textarea { white-space: pre-wrap !important; word-wrap: break-word !important; } into SharePoint text areas.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.