File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -478,6 +478,8 @@ useful methods for working with forms::
478
478
479
479
$method = $form->getMethod();
480
480
481
+ $name = $form->getName();
482
+
481
483
The :method: `Symfony\\ Component\\ DomCrawler\\ Form::getUri ` method does more
482
484
than just return the ``action `` attribute of the form. If the form method
483
485
is GET, then it mimics the browser's behavior and returns the ``action ``
Original file line number Diff line number Diff line change @@ -801,6 +801,12 @@ their type::
801
801
$form['my_form[field][O]']->upload('/path/to/lucas.jpg');
802
802
$form['my_form[field][1]']->upload('/path/to/lisa.jpg');
803
803
804
+ .. tip ::
805
+
806
+ All field names in forms generated by symfony are prefixed with form's name.
807
+ If the name is autogenerated you can get it using
808
+ :method: `Symfony\\ Component\\ DomCrawler\\ Form::getName ` method.
809
+
804
810
.. tip ::
805
811
806
812
If you purposefully want to select "invalid" select/radio values, see
You can’t perform that action at this time.
0 commit comments