1,105,417 Community Members

CFTEXTAREA

Member Avatar
yankeefan24
Light Poster
36 posts since Mar 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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?

Member Avatar
arrgh
Posting Pro in Training
408 posts since Dec 2008
Reputation Points: 22 [?]
Q&As Helped to Solve: 50 [?]
Skill Endorsements: 0 [?]
 
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.

Member Avatar
yankeefan24
Light Poster
36 posts since Mar 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
arrgh
Posting Pro in Training
408 posts since Dec 2008
Reputation Points: 22 [?]
Q&As Helped to Solve: 50 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
yankeefan24
Light Poster
36 posts since Mar 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

9

Member Avatar
arrgh
Posting Pro in Training
408 posts since Dec 2008
Reputation Points: 22 [?]
Q&As Helped to Solve: 50 [?]
Skill Endorsements: 0 [?]
 
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?

Member Avatar
yankeefan24
Light Poster
36 posts since Mar 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 
<div class="grid_12">    
        <cftextarea name="category#accountabilityCategory.id#_successfulComments" class="controlsB" validate="maxlength" maxlength="50">
            #accountabilityCategory.successfulComments#
        </cftextarea>
Member Avatar
danarashad
Junior Poster in Training
60 posts since Jan 2007
Reputation Points: 17 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

maxlength should work, but javascript could also work.

Member Avatar
danarashad
Junior Poster in Training
60 posts since Jan 2007
Reputation Points: 17 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 
You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: