Project

General

Profile

Actions

Bug #3537

closed

Textarea field types: Max Length isn't adding input attribute to prevent overflow

Added by krileon almost 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
25 May 2012
Due date:
% Done:

100%

Estimated time:
3:00 h

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.

https://www.joomlapolis.com/forum/153-professional-member-support/201117-character-limit-in-text-area


Files

3537.patch (767 Bytes) 3537.patch krileon, 25 May 2012 15:11
3537_rev1.patch (1.14 KB) 3537_rev1.patch krileon, 25 June 2012 21:30
Actions #1

Updated by krileon almost 12 years ago

Bug only affected textarea fields. Text fields have the attribute applied fine.

Actions #2

Updated by krileon almost 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
Actions #3

Updated by beat almost 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.

Actions #4

Updated by krileon almost 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?

Actions #5

Updated by beat almost 12 years ago

  • Target version changed from CB 1.8.1 to CB 1.9
Actions #6

Updated by krileon almost 12 years ago

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.

Actions #7

Updated by beat over 11 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.

Actions #8

Updated by beat over 11 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.

Actions

Also available in: Atom PDF