From 52417740dfad19c92a202e5593666215ba45c6dd Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 30 Mar 2013 18:37:40 +0100 Subject: [PATCH 1/2] setValues() instead of setValue() --- components/dom_crawler.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/dom_crawler.rst b/components/dom_crawler.rst index 517a3dbb98b..9b8122acf84 100644 --- a/components/dom_crawler.rst +++ b/components/dom_crawler.rst @@ -281,13 +281,13 @@ To work with multi-dimensional fields:: You must specify the fully qualified name of the field:: // Set a single field - $form->setValue('multi[0]', 'value'); + $form->setValues(array('multi' => array('value'))); // Set multiple fields at once - $form->setValue('multi', array( + $form->setValues(array('multi' => array( 1 => 'value', 'dimensional' => 'an other value' - )); + ))); This is great, but it gets better! The ``Form`` object allows you to interact with your form like a browser, selecting radio values, ticking checkboxes, From da935d330a2c4068af97e9c350c0f6dd2d36cd4e Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 30 Mar 2013 19:04:59 +0100 Subject: [PATCH 2/2] change description text to better describe the modfied examples --- components/dom_crawler.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/dom_crawler.rst b/components/dom_crawler.rst index 9b8122acf84..28f4c694d52 100644 --- a/components/dom_crawler.rst +++ b/components/dom_crawler.rst @@ -278,7 +278,8 @@ To work with multi-dimensional fields:: -You must specify the fully qualified name of the field:: +You must specify the values of multi-dimensional fields as arrays itself to +address which fields' values should be changed:: // Set a single field $form->setValues(array('multi' => array('value')));