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

quicksketch - June 29, 2008 - 19:03

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

Mayor McCheese - June 29, 2008 - 21:05

Where do you put the additional code? In the webform module itself?

#3

quicksketch - June 29, 2008 - 22:16

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

quicksketch - July 23, 2008 - 04:27
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.