{% extends "admin/base_site.html" %} {% load i18n grp_tags %} {% block bodyclass %}grp-doc{% endblock %} {% block content-class %}{% endblock %} {% block title %}Grappelli Documentation » Fieldsets{% endblock %} {% block extrahead %} {% endblock %} {% block breadcrumbs %}
A fieldset is basically a module within a form. Therefore, it's always a fieldset with the class .grp-module which may wrap all sorts of form fields. If the fieldset has a name, it starts with a heading. If the fieldset is collapsible, the heading is required.
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 .l-d-4 sets the width of the fixed column. The layout container wraps two columns: .c-1 has a fixed width and usually contains the label whereas .c-2 has a fluid width and contains the form fields.
If you need a description for the module, just put a p.grp-description in a .grp-row.
Note: Make sure to wrap the fieldset with spaceless-tags to avoid whitespaces.
{% filter force_escape %}
{% templatetag openblock %} spaceless {% templatetag closeblock %}
{% templatetag openblock %} endspaceless {% templatetag closeblock %}
{% endfilter %}