{% extends "base.html" %} {% load examples_tags %} {% block title %}Fieldset Definitions{% endblock %} {% block content %}

Fieldset Definitions

Django-formfieldset's fieldset definitions are quite similar to fieldset definitions of admin app.

Thefieldsets is a list of two-tuples, in which each two-tuple represents a section of the form. The two-tuples are in the format (name, field_options), where name is a string representing the title of the fieldset and field_options is a dictionary defining the contents of the fieldset.

The field_options dictionary can have the following keys:

Take a look at the fieldsets definition from A Simple Example:

    fieldsets = (
        (u'Personal Info', {'fields': ('your_name',
                                       'email_address',
                                       'homepage')}),
        (u'Message', {'fields': ('your_message',)}),
        (u'Options', {'fields': ('send_a_copy_to_me',)}),
    )
{% endblock content %}