Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a23bbdb

Browse filesBrowse files
committed
minor #7766 [Form] Added a small explanation about named forms (iltar, javiereguiluz)
This PR was merged into the 2.7 branch. Discussion ---------- [Form] Added a small explanation about named forms I've added a small explanation on how to add the same form multiple times to the same page, by using named forms. Should fix #4090. Note that this feature was already added in at least one of the patches in 2.1. Commits ------- 8d246c4 Minor reword e0137f5 Added a note about named form types
2 parents 6f2d09c + 8d246c4 commit a23bbdb
Copy full SHA for a23bbdb

File tree

Expand file treeCollapse file tree

1 file changed

+7
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-0
lines changed

‎forms.rst

Copy file name to clipboardExpand all lines: forms.rst
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,13 @@ the choice is ultimately up to you.
703703

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

706+
707+
.. note::
708+
709+
The form name is automatically generated from the type class name. If you want
710+
to modify it, use the :method:`Symfony\\Component\\Form\\FormFactoryInterface::createNamed` method.
711+
You can even suppress the name completely by setting it to an empty string.
712+
706713
Final Thoughts
707714
--------------
708715

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.