Search code examples
textareawhitespaceinfopathword-wrap

Infopath 2010 TextArea not wrapping text, browser view source reveals "white-space: pre"


I have a strange problem with InfoPath 2010. It seems that when using a text with multiline the default formatting will be "white-space: pre" which prevents the text to break at the end of the field. It will only break if enter is manually pressed.

In my case, this is not acceptable. I do not know if it is possible to attache any CSS with my form. This would of course solve my problem.

enter image description here

Any other ideas that could help me crack this one?


Solution

  • Well, I had to solve this quickly so I had to do it the "ugly" way... I opened the xsl-files that had the problem and added the following code:

      <style>
         textarea{
            white-space: normal !important;
         }
      </style>
    

    Then I right-clicked on my "manifest.xsf", selected "design" and published... And voilà!

    Let's hope the form won't break later due to those changes. (Hint: Always back up your code before doing changes to the source-files in InfoPath)...