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!
Maximum Characters for a textarea
-
- Forum Members
- Posts: 10
- Joined: Mon Feb 07, 2011 12:32 pm
Re: Maximum Characters for a textarea
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.

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).
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.

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).