2

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 3

2

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.

0

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

http://social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/76379a89-be22-40f4-ac61-8716f7e7b429

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

0

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.

1
  • Monica, could you please post the script? Also, does it work on Rich Text and Enhanced Rich Text? Thanks!
    – user19663
    Sep 20, 2013 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.