File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -794,20 +794,23 @@ the choice is ultimately up to you.
794
794
795
795
.. tip ::
796
796
797
- When mapping forms to objects, all fields are mapped, any fields on the
797
+ When mapping forms to objects, all fields are mapped. Any fields on the
798
798
form that do not exist on the mapped object will cause an exception to
799
799
be thrown.
800
800
801
801
In cases where you need extra fields in the form (for example: a "do you
802
- agree with these terms" checkbox) that will not be mapped to the undelying
803
- object, you need to set the property_path setting to ``false ``.
802
+ agree with these terms" checkbox) that will not be mapped to the underlying
803
+ object, you need to set the property_path option to ``false ``::
804
804
805
805
public function buildForm(FormBuilder $builder, array $options)
806
806
{
807
807
$builder->add('task');
808
808
$builder->add('dueDate', null, array('property_path' => false));
809
809
}
810
810
811
+ Additionally, if there are any fields on the form that aren't included in
812
+ the submitted data, those fields will be explicitly set to ``null ``.
813
+
811
814
.. index ::
812
815
pair: Forms; Doctrine
813
816
You can’t perform that action at this time.
0 commit comments