Limiting characters in text area attribute

Permalink
Anyone know how to limit the number of characters a user can write into a text area attribute of the profile?

 
JohntheFish replied on at Permalink Reply
JohntheFish
Add the html attribute maxlength="123" (or whatever) to the html textarea tag. You could do it directly in the php where the profile page is output, or add the attribute once the page has rendered by using some jQuery elsewhere in the page.
In the past some browsers ignored this, so you still need to check the returned input later, or use some more jQuery to trim it on submit.