#3512: [patch] Add HTML classes to fields in newforms as_methods: "required" &
"error"
-------------------------------------------------+--------------------------
Reporter: Waylan Limberg <[EMAIL PROTECTED]> | Owner:
adrian
Status: new | Component:
django.newforms
Version: SVN | Resolution:
Keywords: | Stage:
Design decision needed
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
-------------------------------------------------+--------------------------
Changes (by mrmachine):
* cc: [EMAIL PROTECTED] (added)
Comment:
i would like to see something similar to the old css classes that were
applied to actual form elements. with oldforms we had .vPasswordField,
.vEmailField, .vIntegerField, etc. that was great, as it allowed you to
set smaller fields for numerical data, or larger fields for email data.
in a pinch i'd accept simplified classes based on the form field type, not
the model field type. e.g. .text, .button, .checkbox, .radio, and any
other types of form elements specified with the input tag. this is helpful
due to some browsers lacking the more specific selectors and therefore
being unable to distinguish between a checkbox or a text input.
i'd also like to see an "optional" class applied to fields that are
blank=True and/or null=True. if required/error/optional must go on the
containing p, tr, or td tags, i'd like to see them renamed to something a
little more obscure or specific. there may be many people out there who
already have generic required/error classes which are used in p and table
tags but are not actually related to forms. if the classes are assigned to
label or actual form elements, you know it's attached to a form. otherwise
there may be some collission.
--
Ticket URL: <http://code.djangoproject.com/ticket/3512#comment:17>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---