You could set the additional class to the container so you can use
simple CSS selectors to apply different styles to any element from the
container and inside it. Setting the class on the label or the input
field would not allow to modify the container.

My 0.02,
Marc

On 2/16/07, Waylan Limberg <[EMAIL PROTECTED]> wrote:
>
> On Thu, 15 Feb 2007 20:58:27 -0500, Adrian Holovaty <[EMAIL PROTECTED]>
> wrote:
>
> >
> > On 2/15/07, Brian Morton <[EMAIL PROTECTED]> wrote:
> >> I don't know if this has been suggested yet, but has anyone considered
> >> an
> >> enhancement to newforms to optionally allow a field to have a different
> >> class if it has an error?  It would be helpful for things like making
> >> error
> >> fields highlighted red, etc.  Just a thought.
> >
> > Hey Brian,
> >
> > I think we might have discussed this before, but the discussion
> > fizzled out. What would you want to style -- the form HTML tag itself?
> > The <label>? The table row (in case of as_table())?
> >
> > Adrian
> >
> I'd realy like to see this as well. I suppose either way would work, but
> which is used needs to be consistent across all as_methods. Either isn't
> always the containing block element or its always the label or it's always
> the form element. The more I think about it, different people will want to
> apply the style to one of any of those three possibilities. The only way
> to be able to do so consistently is with the containing block. Oh, and
> rather than "a different class" it should add an **additional** class. We
> don't want to remove any classes that already exist.
>
>
> --
> Waylan Limberg
> [EMAIL PROTECTED]
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to