File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -518,11 +518,13 @@ The :class:`Symfony\\Component\\DomCrawler\\Form` object has lots of very
518518useful methods for working with forms::
519519
520520 $uri = $form->getUri();
521-
522521 $method = $form->getMethod();
523-
524522 $name = $form->getName();
525523
524+ .. versionadded :: 4.4
525+
526+ The ``getName() `` method was introduced in Symfony 4.4.
527+
526528The :method: `Symfony\\ Component\\ DomCrawler\\ Form::getUri ` method does more
527529than just return the ``action `` attribute of the form. If the form method
528530is GET, then it mimics the browser's behavior and returns the ``action ``
Original file line number Diff line number Diff line change @@ -814,9 +814,14 @@ their type::
814814
815815.. tip ::
816816
817- All field names in forms generated by Symfony are prefixed with the form's name.
818- If the name is autogenerated you can get it using
819- :method: `Symfony\\ Component\\ DomCrawler\\ Form::getName ` method.
817+ Instead of hardcoding the form name as part of the field names (e.g.
818+ ``my_form[...] `` in previous examples), you can use the
819+ :method: `Symfony\\ Component\\ DomCrawler\\ Form::getName ` method to get the
820+ form name.
821+
822+ .. versionadded :: 4.4
823+
824+ The ``getName() `` method was introduced in Symfony 4.4.
820825
821826.. tip ::
822827
You can’t perform that action at this time.
0 commit comments