Cascading style sheets

The django-formrenderingtools application uses a set of default CSS classes. So you may want to write a CSS stylesheet. Here is the list of classes that are used.

General styles

The following CSS classes are applied by the default form layout:

ul.errorlist{} /* non field error list container */
ul.errorlist li{} /* non field error */
.formItem{} /* container for each field (field errors, label, input and help text) */
.formItem.required{} /* fields that are required */
.formItem.hasErrors{} /* fields that have errors */
.formItem ul.errorlist{} /* field error list */
.formItem ul.errorlist li{} /* field error */
.formItem label{} /* field label */
.formItem.required label{} /*  label of required fields */
.formItem.hasErrors label{} /* label of fields that have errors */
.formItem .help{} /* container for field help text */

You may also declare additional styles for inputs.

Notice that hidden fields are not rendered in a “formItem” container.

Field specific styles

If the input is not hidden, then the HTML name of the field is appended as a CSS class at the field container level.

As an example, customizing the CSS class ”” and children will affect only the form fields named “email”. So, to customize the input you will have to customize ” input”.