From 319aca3920129d04fb9d0f02a9dd0381b26e8a2b Mon Sep 17 00:00:00 2001 From: peterrehm Date: Tue, 3 Sep 2013 08:50:25 +0200 Subject: [PATCH 1/4] Added hint about modifying an unmapped form field --- book/forms.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/book/forms.rst b/book/forms.rst index 60c19b1c2ce..882568033f6 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -1075,6 +1075,10 @@ the choice is ultimately up to you. The field data can be accessed in a controller with:: $form->get('dueDate')->getData(); + + In addition the data of a unmapped field can also directly be modified :: + + $form->get('dueDate')->setData('dueDate'); Defining your Forms as Services ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 1992e5c57c2973aa4b3cf79a9fccffd90be1fa04 Mon Sep 17 00:00:00 2001 From: peterrehm Date: Tue, 3 Sep 2013 11:43:57 +0200 Subject: [PATCH 2/4] Fixed typos --- book/forms.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/forms.rst b/book/forms.rst index 882568033f6..77b48b9e593 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -1076,7 +1076,7 @@ the choice is ultimately up to you. $form->get('dueDate')->getData(); - In addition the data of a unmapped field can also directly be modified :: + In addition, the data of an unmapped field can also directly be modified:: $form->get('dueDate')->setData('dueDate'); From c9cf91c629b041fd444e38e88d9a4d581ca49e8e Mon Sep 17 00:00:00 2001 From: peterrehm Date: Tue, 3 Sep 2013 16:14:27 +0200 Subject: [PATCH 3/4] Updated typo --- book/forms.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/forms.rst b/book/forms.rst index 77b48b9e593..35836e1c009 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -1076,7 +1076,7 @@ the choice is ultimately up to you. $form->get('dueDate')->getData(); - In addition, the data of an unmapped field can also directly be modified:: + In addition, the data of an unmapped field can also be modified directly:: $form->get('dueDate')->setData('dueDate'); From 42946f6dcede70048948ee301df76f060c3f5cd9 Mon Sep 17 00:00:00 2001 From: peterrehm Date: Thu, 19 Sep 2013 00:03:52 +0200 Subject: [PATCH 4/4] Updated parameter --- book/forms.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/forms.rst b/book/forms.rst index 35836e1c009..4baade43af8 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -1078,7 +1078,7 @@ the choice is ultimately up to you. In addition, the data of an unmapped field can also be modified directly:: - $form->get('dueDate')->setData('dueDate'); + $form->get('dueDate')->setData(new \DateTime()); Defining your Forms as Services ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~