{% extends "admin/base_site.html" %} {% load i18n grp_tags %}{% load url from future %} {% block bodyclass %}grp-doc{% endblock %} {% block content-class %}{% endblock %} {% block title %}Grappelli Documentation » Fieldsets{% endblock %} {% block extrahead %} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block content %}

Fieldsets

Modules in Forms

A fieldset basically is a module within a form. Therefore it's always a fieldset with the class .grp-module. It may carry all sorts of form fields.

If it has a name it starts with a heading and if you want it to be collapsible it has to have a name.

The grid-like structure within fieldsets is based on a predefined layout based on the Mueller Grid System.
Within each .grp-row there is a layout-container .l-2c-fluid.l-d-4 (or .grp-cell.l-2c-fluid.l-d-4 if you got cells) where the .l-d-4 sets the width of the fixed column. The layout container carries two columns: The .c-1 has a fixed width and usually carries the label whereas the .c-2 has fluid width and carries some sort of form field.

There might be a description for a module - just put a p.grp-description in a .grp-row.

Make sure to wrap the fieldset with spaceless-tags to avoid whitespaces.

{% spaceless %}

Fieldset Name

Some text describing the fieldset

Helptext

  • Errorlist

Helptext

{% endspaceless %}
{% filter force_escape %}
{% templatetag openblock %} spaceless {% templatetag closeblock %}
    

Fieldset Name

Some text describing the fieldset

Helptext

  • Errorlist

Helptext

{% templatetag openblock %} endspaceless {% templatetag closeblock %} {% endfilter %}

Modules in Groups

As fieldsets are modules you may also combine them in (stacked & tabular) groups.

{% endblock %}