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::
478478
479479 $method = $form->getMethod();
480480
481+ $name = $form->getName();
482+
481483The :method: `Symfony\\ Component\\ DomCrawler\\ Form::getUri ` method does more
482484than just return the ``action `` attribute of the form. If the form method
483485is 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::
801801 $form['my_form[field][O]']->upload('/path/to/lucas.jpg');
802802 $form['my_form[field][1]']->upload('/path/to/lisa.jpg');
803803
804+ .. tip ::
805+
806+ All field names in forms generated by symfony are prefixed with from's name.
807+ If the name is autogenerated you can get it using
808+ :method: `Symfony\\ Component\\ DomCrawler\\ Form::getName ` method.
809+
804810.. tip ::
805811
806812 If you purposefully want to select "invalid" select/radio values, see
You can’t perform that action at this time.
0 commit comments