reinstate the model field type css classes to form elements generated with newforms' as_* methods.
|Reported by:||mrmachine||Owned by:||nobody|
|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|
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 Changed 7 years ago by SmileyChris
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Design decision needed
comment:2 Changed 7 years ago by Gary Wilson <gary.wilson@…>
- Resolution set to duplicate
- Status changed from new to closed
comment:3 Changed 7 years ago by Gary Wilson <gary.wilson@…>
- Resolution duplicate deleted
- Status changed from closed to reopened