Opened 18 years ago
Closed 17 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 |
Description
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 settings.py 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 , 18 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:3 by , 18 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Sorry, it must be getting late. This is no duplicate.
comment:4 by , 17 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
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.
Adrian?