On Tue, Jul 13, 2010 at 12:28 AM, Preston Timmons
<prestontimm...@gmail.com> wrote:
> Hey Russ,
>
> I think this is a great proposal so far!
>
> Is there a way with the proposed solution for the template designer to
> add custom attributes to a form field? If so, do you envision that
> happening in the chrome layer?

Under my proposal as I presented it -- yes, it's a chrome issue.
Chrome is essentially a set of operations that can be performed on the
raw widget output; adding attributes, classes, wrapping the widget
HTML in other HTML, or registering the need for trigger Javascript.

As a helper mechanism, we could ship a generic "attribute" chrome that
allows you to set or override a specific attribute:

{% form myform field name using attr:"autocorrect=off" %}

Adding classes could also be handled as chrome:

{% form myform field name using class="colorful large" %}

Since chrome can be stacked, you could have multiple attr, class, or
any other chrome.

Yours,
Russ Magee %-)

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

Reply via email to