Page 1 of 1

Maximum Characters for a textarea

Posted: Mon Oct 31, 2011 10:36 am
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!

Re: Maximum Characters for a textarea

Posted: Tue Nov 01, 2011 4:25 am
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).