use javascript, in the form tag onsubmit=check_form()
in the function check_form check this (and other) field(s) for validation.
formname.inputname.value.length() returns the length of the string.
You can also set the max size of the field to 30.
actually, since the cf form tags generate javascript themselves, adding your own onsubmit javascript is a little tricky
luckily, the cfinput tag covers range validation
example:
<cfinput type = "Text" name = "MyRange" range = "1,5"
message = "You must enter an integer from 1 to 5"
validate = "integer" required = "No">
You are right, didn't think far enough. Use a combination of form and cfform in my pages. Still, if the input only has to check if there are no more than 30 characters the maxlength="30" should be the easiest implementation.
thanks for putting me right. ;-) Erwin Oosterhoorn
Analyst Programmer,
Roller hockey'er, biker,
ice hockey player/fan.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.