Permalink
Browse files

setValues() instead of setValue()

  • Loading branch information...
1 parent e0ebba8 commit f6d047675e28acee7351efbfce3c7cce2fb9324b @xabbuh xabbuh committed with weaverryan Mar 30, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 components/dom_crawler.rst
View
6 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,

0 comments on commit f6d0476

Please sign in to comment.