{% extends "admin/base_site.html" %} {% load i18n %} {% block bodyclass %}grp-doc{% endblock %} {% block content-class %}{% endblock %} {% block title %}Grappelli Documentation » Form Fields{% endblock %} {% block extrahead %} {% endblock %} {% block breadcrumbs %}
You may use all common type of form fields with Grappelli. But there are some classes and specific types of form fields which are explained below.
To mark a label as required, simply add the class .required.
Note: Labels are outside Grappellis namespace because they are hardcoded with Django.
{% filter force_escape %}
{% endfilter %}
The following classes basically handle the widths of form fields in different contexts. They apply only to form fields which are not children of any grid-container (e.g. .g-d-c or .g-d-24). Form fields which are children of a grid-container always stretch to 100% width.
For more detailed information about the grid, take a look at the grid system we use.
Read-only fields are represented with div.grp-readonly.
{% filter force_escape %}
{% endfilter %}
Please take a look at errors in forms.