Maximum Characters for a textarea

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
dirkvdzanden
Forum Members
Forum Members
Posts: 10
Joined: Mon Feb 07, 2011 12:32 pm

Maximum Characters for a textarea

Post by dirkvdzanden »

I'm using formbuilder 0.7 and cmsms 1.9.4.2.
I created a contactform with an textarea. I want to set a maximum number of characters, but can't find where to do this. When i enter a number in the field Maximum length it won't work. Is there a way to give a textarea a maximum number of characters?

I want to give the textarea a maximum of 300 characters. Do i need to do this with a JS or is there another way? And is it possible to change this for another textarea to 500 characters?

Thanks in advance!
User avatar
frankmanl
Power Poster
Power Poster
Posts: 425
Joined: Sat Jul 12, 2008 3:50 am

Re: Maximum Characters for a textarea

Post by frankmanl »

Hi Dirk,
When you set the Maximum length of field content to i.e. 10 the field will be limited to 10 characters, but you'll only see that when you try to send it. Then an error appears.
Image
It would be nicer to have a counter that tells how many characters are left, but as far as I can see you would have to add that yourself.
A quick and simple solution might be to set the number of rows and columns to aproximately the allowed number of characters and change the field name to something like Message (max. 10 characters).
Post Reply

Return to “Modules/Add-Ons”