Opened 19 years ago

Closed 18 years ago

#1568 closed defect (wontfix)

[patch] CharFields with small maxlength are still displayed with a size of 30

Reported by: RahmCoff@… Owned by: Adrian Holovaty
Component: contrib.admin Version: dev
Severity: trivial Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

All of the CharFields are displayed as text input fields with a size of 30, even when the maxlength is much smaller. This can create confusion when the user is unable to type letters in an almost empty field.

Attachments (1)

charfield_size.diff (961 bytes ) - added by LawrenceOluyede 18 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by asmodai@…, 19 years ago

Version: SVN

This is indeed true for the SVN branch.

by LawrenceOluyede, 18 years ago

Attachment: charfield_size.diff added

comment:2 by LawrenceOluyede, 18 years ago

Summary: CharFields with small maxlength are still displayed with a size of 30[patch] CharFields with small maxlength are still displayed with a size of 30

comment:3 by Simon G. <dev@…>, 18 years ago

Triage Stage: UnreviewedReady for checkin

comment:4 by Malcolm Tredinnick, 18 years ago

Resolution: wontfix
Status: newclosed

The oldforms package has been end-of-lifed now, so we are not going to be applying any further enhancements like this to it. We do want to check that the same problem doesn't appear on newforms, though.

[For the record, there is a problem with this patch as it stands: it should only trim the length for really short fields. Otherwise, a field with a maxlength of 200 will destroy the form layout. So some kind of check that it only adjusts the length to maxlength if maxlength < 30 would be required. That is why self.length exists in the first place. It should also probably have had a minimum of 2 or 3 on the length.]

Note: See TracTickets for help on using tickets.
Back to Top