Need a way to limit the number of characters in the TEXTAREA field
Mayor McCheese - June 29, 2008 - 18:32
| Project: | Webform |
| Version: | 6.x-2.0-beta6 |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I need a way to limit the number of characters or words that a user can enter into a TEXTAREA field in a form created with webform. As implemented currently a user can put an unlimited amount of text into this type of field; I need to limit them to about 400 words.

#1
This currently isn't available, but you can create your own maximum length requirement by using the additional validation code. There are a few examples in the Webform handbook: http://drupal.org/handbook/modules/webform, specifically this minimum length example could easily be made into a maximum length: http://drupal.org/node/237281
#2
Where do you put the additional code? In the webform module itself?
#3
If you are user #1 or have the "use PHP for additional processing" permission, there is a field for "Additional Validation" code under the Webform Advanced Settings on the node edit form.
#4