Skip to main content
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
I'm trying to limit the amount of characters that can be entered into a TextareaField in the admin area (eg. 400 char limit) but I can't seem to find any info on this on the forum or documentation.
I can limit a simple TextField using
$f->addFieldToTab("Root.Content.Main", new TextField('Intro', 'Intro', '', 400), 'Content');
But can't find anything for TextareaField.
Any help would be appreciated.
No way AFAIK built in to do this. Whenever I've had to do this I've implemented a custom jQuery based solution like http://www.devcurry.com/2009/08/limit-number-of-characters-in-textarea.html
Thanks for your help Willr.
I'll give the jQuery solution a go!