Closed (won't fix)
Project:
Content Construction Kit (CCK)
Version:
5.x-1.7
Component:
text.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Aug 2008 at 20:11 UTC
Updated:
11 Jan 2012 at 16:27 UTC
The CCK text module does not use the "max_length" value defined for a text field if it is a textarea field. So the built-in validation that checks for #maxlength does not get applied.
I added lines in to do this in the text_widget() function - basically just copying the lines that define #maxlength for text fields - and it seems to work. At least, I am getting validation of the maximum length now, and nothing seems to be broken...
I honestly don't know if this is a "feature" - in that, there is a reason for it being this way - so if there is, that would be useful to know (with some words about what that reason might be, of course...)
I'm attaching a patch file to show the changes I made.
| Comment | File | Size | Author |
|---|---|---|---|
| cck.text_.textarea_maxlength.patch | 1.16 KB | brad.bulger |
Comments
Comment #1
karens commentedThe D5 version is no longer being supported. Sorry.