Skip to content

Commit

Permalink
describe the allow_extra_fields form option
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed May 23, 2015
1 parent a504acf commit 3de6960
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions reference/forms/types/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on all types for which ``form`` is the parent type.

+-----------+--------------------------------------------------------------------+
| Options | - `action`_ |
| | - `allow_extra_fields`_ |
| | - `by_reference`_ |
| | - `cascade_validation`_ |
| | - `compound`_ |
Expand Down Expand Up @@ -52,6 +53,20 @@ Field Options

.. include:: /reference/forms/types/options/action.rst.inc

allow_extra_fields
~~~~~~~~~~~~~~~~~~

.. versionadded:: 2.6
The ``allow_extra_fields`` option was introduced in Symfony 2.6.

**type**: ``boolean`` **default**: ``false``

Usually, if you submit extra fields that aren't configured in your form,
you'll get a "This form should not contain extra fields." validation error.

You can silence this validation error by enabling the ``allow_extra_fields``
option on the form.

.. include:: /reference/forms/types/options/by_reference.rst.inc

.. include:: /reference/forms/types/options/cascade_validation.rst.inc
Expand Down

0 comments on commit 3de6960

Please sign in to comment.