From 3de6960c1a4b1c3513d06b8a0bb8b9ab375d1adf Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 3 Aug 2014 09:38:51 +0200 Subject: [PATCH] describe the allow_extra_fields form option --- reference/forms/types/form.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/reference/forms/types/form.rst b/reference/forms/types/form.rst index ae0f66edcc0..4e9dccb95ed 100644 --- a/reference/forms/types/form.rst +++ b/reference/forms/types/form.rst @@ -9,6 +9,7 @@ on all types for which ``form`` is the parent type. +-----------+--------------------------------------------------------------------+ | Options | - `action`_ | +| | - `allow_extra_fields`_ | | | - `by_reference`_ | | | - `cascade_validation`_ | | | - `compound`_ | @@ -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