Skip to content

Support for ChoiceField #36

Open
Open
@filipeximenes

Description

@filipeximenes

It's possible to render choice fields this way:

{% for radio in form.my_radio_field %}
                  {{ radio.tag }}
                  {{ radio.choice_label }}
{% endfor %}

This gives more control over the generated HTML. It's not currently possible to use widget tweaks template tags in this case. Eg.:

{% for radio in form.my_radio_field %}
                  {{ radio.tag|add_class:"some-class" }}
                  {{ radio.choice_label }}
{% endfor %}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions