Opened 17 years ago

Closed 16 years ago

#3898 closed (wontfix)

reinstate the model field type css classes to form elements generated with newforms' as_* methods.

Reported by: Tai Lee Owned by: nobody
Component: Forms Version: dev
Severity: Keywords: newforms oldforms model css classes form_for_model form_for_instance
Cc: real.human@… Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


i'd like to see the model field type classes from oldforms (vIntegerField, vEmailField, vPasswordField, etc) re-applied to form elements generated by newforms' as_* methods. these were great as they allowed differently sized field elements depending on the data type. e.g. you might want an input text tag for an email address to be wider than an input text tag for an integer or a date.

if people don't want to make use of these, they can ignore them, but i don't see the harm in having them in there as hooks besides a few bytes in html size, especially for the as_* methods. if that's a problem, they could be switched on or off in or when the form.as_* and field.as_* methods are called. not having these hooks appears to be a fairly significant departure from the oldforms functionality, so i'd like to see them reinstated if there are no major objections.

Change History (4)

comment:1 by Chris Beaven, 17 years ago

Triage Stage: UnreviewedDesign decision needed


comment:2 by Gary Wilson <gary.wilson@…>, 17 years ago

Resolution: duplicate
Status: newclosed

duplicate of #3686.

comment:3 by Gary Wilson <gary.wilson@…>, 17 years ago

Resolution: duplicate
Status: closedreopened

Sorry, it must be getting late. This is no duplicate.

comment:4 by Adrian Holovaty, 16 years ago

Resolution: wontfix
Status: reopenedclosed

Eh, I removed this because it seemed magical to add framework-specific stuff in the output. You can always create your own widgets that add those attributes.

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