Skip to content

Commit e0137f5

Browse files
committed
Added a note about named form types
1 parent 6f2d09c commit e0137f5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

forms.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,12 @@ the choice is ultimately up to you.
703703

704704
$form->get('agreeTerms')->setData(true);
705705

706+
707+
.. note::
708+
A form name is generated from the type class name, if you want to set it
709+
explicitly, use :method:`FormFactoryInterface::createNamed() <Symfony\\Component\\Form\\FormFactoryInterface>`.
710+
You can even suppress the name completely by setting it to an empty string.
711+
706712
Final Thoughts
707713
--------------
708714

0 commit comments

Comments
 (0)