diff --git a/components/dom_crawler.rst b/components/dom_crawler.rst index 517a3dbb98b..28f4c694d52 100644 --- a/components/dom_crawler.rst +++ b/components/dom_crawler.rst @@ -278,16 +278,17 @@ 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->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,