Skip to content

Commit

Permalink
Added note about customizing errors for different field types.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrojanowski committed Feb 20, 2014
1 parent 236d06b commit 1e278c4
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions cookbook/form/form_customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,17 @@ and customize the ``form_errors`` fragment.
See :ref:`cookbook-form-theming-methods` for how to apply this customization.

You can also customize the error output for just one specific field type.
For example, certain errors that are more global to your form (i.e. not specific
to just one field) are rendered separately, usually at the top of your form:
To customize *only* the markup used for these errors, follow the same directions
as above but put the contents in a relative ``_errors`` block (or file in case
of PHP templates). For example: ``text_errors`` (or ``text_errors.html.php``).

.. tip::

See :ref:`form-template-blocks` to find out which specific block or file you
have to customize.

Certain errors that are more global to your form (i.e. not specific to just one
field) are rendered separately, usually at the top of your form:

.. configuration-block::

Expand Down

0 comments on commit 1e278c4

Please sign in to comment.