Character limits on Multiline Boxes in InfoPath 2010

Problem

InfoPath does not allow you to use character limits on multiline boxes. You can however, work around this issue by using a validation rule that prevents a user from submitting a form when it exceeds a specific number of characters.

Solution

  • Open the form in InfoPath
  • Select the field you wish to limit
  • On the Ribbon, click on Home -> Manage Rules
  • Add a New Validation Rule
  • Call it whatever you like, e.g. “CheckStringLength”
  • Set the condition as follows:

string-length(.)>250

where 250 is the character limit.

  • The end result of your rule should look like this:

  • Test your new validation rule by typing something that exceeds the number of characters you specified.
  • A red box should appear around the field and you will not be able to submit the form until you correct it. It is advisable to include a tool tip to inform the user on the maximum number of characters.

Tags:

2 Responses to “Character limits on Multiline Boxes in InfoPath 2010”

  1. mmcglynn December 21, 2011 at 2:26 am #

    Very helpful, thank you!

  2. Lori October 30, 2013 at 2:22 am #

    Thank YOU!!!

Leave a Reply

%d bloggers like this: