File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -338,10 +338,19 @@ given text. This method is especially useful because you can use it to return
338338a :class: `Symfony\\ Component\\ DomCrawler\\ Form ` object that represents the
339339form that the button lives in::
340340
341- $form = $crawler->selectButton('validate')->form();
341+ // button example: <button id="my-super-button" type="submit">My super button</button>
342+
343+ // you can get button my it's name
344+ $form = $crawler->selectButton('My awesome button!')->form();
345+
346+ // or by by button id (#my-super-button) if button don't have name
347+ $form = $crawler->selectButton('my-super-button')->form();
348+
349+ // or you can filter whole form
350+ $crawler->filter('.form-vertical')->form();
342351
343352 // or "fill" the form fields with data
344- $form = $crawler->selectButton('validate ')->form(array(
353+ $form = $crawler->selectButton('my-super-button ')->form(array(
345354 'name' => 'Ryan',
346355 ));
347356
You can’t perform that action at this time.
0 commit comments