jazzband / django-floppyforms

Full control of form rendering in the templates.
http://django-floppyforms.readthedocs.org/
Other
839 stars 145 forks source link

{% formconfig field ... for "<widget class name here>" %} #69

Closed gregmuellegger closed 11 years ago

gregmuellegger commented 11 years ago

Hi,

I added support for using widget classes as a filter for the {% formconfig field ... %}.

The usecase for this is to specify extra attributes for textareas. Textareas are usually used on CharFields, so we have no way yet of passing extra arguments to those templates. With the proposed formconfig filtering this is possible:

{% form form using %}
    {% formconfig field with extra_classes="span12" for "Textarea" %}
    ...
{% endform %}