We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 561c6ee commit d34edffCopy full SHA for d34edff
book/forms.rst
@@ -1084,6 +1084,15 @@ the choice is ultimately up to you.
1084
->add('save', 'submit');
1085
}
1086
1087
+ .. versionadded:: 2.6
1088
+ The ``allow_extra_fields`` option was introduced in Symfony 2.6.
1089
+
1090
+ If you have many additional fields, this task may become tedious. Since Symfony
1091
+ 2.6, you can use the ``allow_extra_fields`` option when building the form
1092
+ to ignore all extra fields::
1093
1094
+ $form = $this->createForm(new TaskType(), $task, array('allow_extra_fields' => true));
1095
1096
Additionally, if there are any fields on the form that aren't included in
1097
the submitted data, those fields will be explicitly set to ``null``.
1098
0 commit comments