I have created a custome list with a multiple line of text type column. When user enter value in this field in "add new item" form, I dont want user to enter more than 1000 chars. I am not able to find "Maximum number of characters allowed" control for it like single line of text type column. Please help. Thanks in advance.
3 Answers
You can customize the list forms in infopath and add a validation expression for that field to validate the length. Use expression string-length(.) > 1000
, which will invalidate the form if the length is greater than 1000.
One way of doing this is to check on Itemadding and itemupdating with a custom piece of code in an event reciever and put a description on the field saying please do not exceed 1000 characters
This would flag an error when they go to submit the item. Hope this helps
This URL may help
I haven't got time to check but if you have access to the server get SharePointManager on there find your field and see if there are any properties against that field that allow you to restrict it's length. I can't see that there will be but stranger things have happend!
Cheers
Truez
In case you do not want to add any custom code or modify the page using infopath, you can always use jQuery to get the field instance. Get the data entered by user and alert message for the validations required .... Let know if you need the script.
-
Monica, could you please post the script? Also, does it work on Rich Text and Enhanced Rich Text? Thanks!– user19663Sep 20, 2013 at 14:44