Skip to content

Commit f6d0476

Browse files
xabbuhweaverryan
authored andcommitted
setValues() instead of setValue()
1 parent e0ebba8 commit f6d0476

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/dom_crawler.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,13 +281,13 @@ To work with multi-dimensional fields::
281281
You must specify the fully qualified name of the field::
282282

283283
// Set a single field
284-
$form->setValue('multi[0]', 'value');
284+
$form->setValues(array('multi' => array('value')));
285285

286286
// Set multiple fields at once
287-
$form->setValue('multi', array(
287+
$form->setValues(array('multi' => array(
288288
1 => 'value',
289289
'dimensional' => 'an other value'
290-
));
290+
)));
291291

292292
This is great, but it gets better! The ``Form`` object allows you to interact
293293
with your form like a browser, selecting radio values, ticking checkboxes,

0 commit comments

Comments
 (0)