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 »
Related InfoPath Articles:
- Limit the amount of lines in a multi-line text box
- Limit a multi-select list box to a maximum of 3 selected items
- InfoPath 2010 repeating table validation for unique values
- InfoPath functions with examples
- Add validation rules to a people picker in InfoPath 2013
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.