Form template: Limiting characters in a multiline text box

This video is a demonstration of an InfoPath form template with a multiline text box of which its amount of characters is being limited to 25.

You can use data validation in InfoPath to limit the amount of characters that can be entered into a multi-line text box. And you can use the string-length() function to count the amount of characters in a text box.

However, the string-length() function does not return the correct amount of characters when a multi-line text box consists of multiple lines of text. Therefore you must apply a correction to the amount returned by the string-length() function to get the correct amount of characters entered in the multi-line text box.

Note that the solution implemented differs between InfoPath Filler forms and browser forms, so the download package contains 2 form templates: A Filler Form template and a Web Browser Form template.


Related InfoPath Articles:


Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author.