Skip to content

Commit 8c83da8

Browse files
committed
Changed to a note
1 parent 0d10261 commit 8c83da8

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

forms.rst

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -699,15 +699,11 @@ the choice is ultimately up to you.
699699

700700
$form->get('agreeTerms')->setData(true);
701701

702-
Rendering the Same Form Multiple Times on the Same Page
703-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
704-
705-
In some situations you might find yourself in need of having the same form on
706-
the same page multiple times. By default, a form name is based off the class of
707-
the form type. To differentiate between the forms, you can create a form using
708-
:method:`FormFactoryInterface::createNamed() <Symfony\\Component\\Form\\FormFactoryInterface>`.
709-
Doing so, will change the html name of the form and Symfony will be able to see
710-
which of the forms was submitted, and handle it accordingly.
702+
703+
.. note::
704+
A form name is generated from the type class name, if you want to set it
705+
explicitly, use :method:`FormFactoryInterface::createNamed() <Symfony\\Component\\Form\\FormFactoryInterface>`.
706+
You can even suppress the name completely by setting it to an empty string.
711707

712708
Final Thoughts
713709
--------------

0 commit comments

Comments
 (0)