Bug #3537
closedTextarea field types: Max Length isn't adding input attribute to prevent overflow
Description
There is PHP protection for max length, but when editing the field you've no idea that max length is present until you attempt to save. For fields that support it the attribute "maxlength" should be added.
Files
Updated by krileon over 12 years ago
Bug only affected textarea fields. Text fields have the attribute applied fine.
Updated by krileon over 12 years ago
- File 3537.patch 3537.patch added
- Status changed from Assigned to Resolved
- Assignee changed from krileon to beat
- % Done changed from 0 to 100
Updated by beat over 12 years ago
- Status changed from Resolved to Feedback
- Assignee changed from beat to krileon
- % Done changed from 100 to 0
Text area input fields do not have such an attribute in XHTML.
So this patch is not applicable.
Updated by krileon over 12 years ago
- Assignee changed from krileon to beat
maxlength is a valid attribute for HTML5 and as I understand the default Joomla template (Beez5) in addition to a lot of 3rd parties are releasing HTML5. Alternative is a JS based implementation or simply removing the parameter all together (would be better then having users find out after POST they input too many characters, that'd be frustrating); actually, shouldn't there be a validation rule for jQuery validation to handle maxlength?
Updated by beat over 12 years ago
- Target version changed from CB 1.8.1 to CB 1.9
Updated by krileon over 12 years ago
- File 3537_rev1.patch 3537_rev1.patch added
- Status changed from Feedback to Resolved
- % Done changed from 0 to 100
Rev1 adds a validation rule for the textarea for maxlength when using new validation method (default). This will at least inform the user before they attempt to submit that they've surpassed the maximum.
Updated by beat about 12 years ago
- Subject changed from Max Length isn't adding input attribute to prevent overflow to Textarea field types: Max Length isn't adding input attribute to prevent overflow
- Status changed from Resolved to Closed
- Estimated time set to 3:00 h
r1891 implements both fixes as proposed, so that old and new browsers should be happy.
Thank you Kyle.
Updated by beat about 12 years ago
r1909 reverts broken Javascript part of fix of r1891:
CB mass-mailing on Joomlapolis was broken by this.
HTML 5 part of fix is enough here.