Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3de6960

Browse filesBrowse files
committed
describe the allow_extra_fields form option
1 parent a504acf commit 3de6960
Copy full SHA for 3de6960

File tree

Expand file treeCollapse file tree

1 file changed

+15
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+15
-0
lines changed

‎reference/forms/types/form.rst

Copy file name to clipboardExpand all lines: reference/forms/types/form.rst
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on all types for which ``form`` is the parent type.
99

1010
+-----------+--------------------------------------------------------------------+
1111
| Options | - `action`_ |
12+
| | - `allow_extra_fields`_ |
1213
| | - `by_reference`_ |
1314
| | - `cascade_validation`_ |
1415
| | - `compound`_ |
@@ -52,6 +53,20 @@ Field Options
5253

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

56+
allow_extra_fields
57+
~~~~~~~~~~~~~~~~~~
58+
59+
.. versionadded:: 2.6
60+
The ``allow_extra_fields`` option was introduced in Symfony 2.6.
61+
62+
**type**: ``boolean`` **default**: ``false``
63+
64+
Usually, if you submit extra fields that aren't configured in your form,
65+
you'll get a "This form should not contain extra fields." validation error.
66+
67+
You can silence this validation error by enabling the ``allow_extra_fields``
68+
option on the form.
69+
5570
.. include:: /reference/forms/types/options/by_reference.rst.inc
5671

5772
.. include:: /reference/forms/types/options/cascade_validation.rst.inc

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.