1.11M Members

CFTEXTAREA

 
0
 

Is there away to limt cftextarea by word not characters? I need to limit my form to 250 words. is there a way to do this?

 
0
 

I doubt there is anything built in, but you could roll your own. Grab the textarea value, split it on some sort of word boundary (space, etcetera) and validate.

 
0
 

I tried Maxlength="250" validate="maxlength" to limt by characters but it did not work. Im using rich text areas

 
0
 

Worked fine for me. Maybe you've got an error in your code? Also what's your CF version?

 
0
 

9

 
0
 

Well like I said, there's no reason it should not work. Maybe there's an error in your code. Can you post it?

 
0
 
<div class="grid_12">    
        <cftextarea name="category#accountabilityCategory.id#_successfulComments" class="controlsB" validate="maxlength" maxlength="50">
            #accountabilityCategory.successfulComments#
        </cftextarea>
 
0
 

maxlength should work, but javascript could also work.

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: