Character count on textarea attribute

Permalink 1 user found helpful
Hi I need to limit the user to a maximum amount of characters in a textarea attribute for a page. What are my options and does anyone know if there is anyway I can do this?

 
cjramki replied on at Permalink Reply
cjramki
IMHO for that u may use text box...
magpie replied on at Permalink Reply
Is it possible to use a character count on a textbox then? Would you please describe how?
JohntheFish replied on at Permalink Reply
JohntheFish
bbeng89 replied on at Permalink Reply
bbeng89
Hm, it depends on how you are rendering the text area attribute. Also what page are you trying to restrict them on? Is it like a profile or registration page? Or one of the dashboard pages?
magpie replied on at Permalink Reply
It's a dashboard page, when a user is entering the property of a page which in this case is a textbox, I believe it uses tinyMCE?
bbeng89 replied on at Permalink Reply
bbeng89
Hm, it may be possible but with TinyMCE it is definitely not going to be easy. It's also probably going to have strange results because all of the HTML characters that TinyMCE adds will count towards the character limit. For instance:
//without tinymce (11 chars)
Hello World 
//with tinymce (18 chars)
<p>Hello World</p>


So honestly, I'm not really sure how you would go about doing this for TinyMCE. I did find this article in the TinyMCE docs:http://www.tinymce.com/wiki.php/TinyMCE3x:How_to_limit_number_of_ch... but I'm honestly not sure how you would go about getting that code in to tinymce just for this one specific text area. Maybe someone else in here will have some more ideas.
magpie replied on at Permalink Reply
What if I was to use plain text for the text area attribute, would that make things easier?
jshannon replied on at Permalink Reply
jshannon
If you don't need tinymce support, and you're mildly comfortable with your server and PHP (ie, able to install a package manually), you should check outhttp://www.concrete5.org/marketplace/addons/lerteco-advanced-text-a...

It was updated a few months ago to provide max character feedback, but I haven't been able to push those changes back up to the marketplace.
Remo replied on at Permalink Reply
Remo