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.
The following video is a demonstration of an InfoPath form template that implements such functionality. The form template is available for download by InfoPath 2010 Cookbook customers in the InfoPath 2010 Cookbook Club or by InfoPath 2013 Cookbook customers in the InfoPath 2013 Cookbook Club.
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.
See more InfoPath 2013 tutorial videos »
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 of S.Y.M. Wong-A-Ton. 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, S.Y.M. Wong-A-Ton.