Skip to content

Commit 96b755e

Browse files
committed
Minor reword
1 parent f710996 commit 96b755e

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

components/dom_crawler.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,11 +518,13 @@ The :class:`Symfony\\Component\\DomCrawler\\Form` object has lots of very
518518
useful 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+
526528
The :method:`Symfony\\Component\\DomCrawler\\Form::getUri` method does more
527529
than just return the ``action`` attribute of the form. If the form method
528530
is GET, then it mimics the browser's behavior and returns the ``action``

testing.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)