Skip to content

Commit 57c1b2e

Browse files
Renaming the article
Reason: If you read "How to Embed a Collection of Forms" at https://symfony.com/doc/3.4/forms.html#learn-more it doesn't really reveal what this is all about. So I changed the title to something which describes it better from the user's point of view. I also removed all occurrences of "you" in the first paragraph, see symfony#13445 (comment)
1 parent 2a475ba commit 57c1b2e

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

form/form_collections.rst

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
.. index::
22
single: Form; Embed collection of forms
33

4-
How to Embed a Collection of Forms
5-
==================================
4+
Edit Related Entities in a Single Form
5+
======================================
66

7-
In this article, you'll learn how to create a form that embeds a collection
8-
of many other forms. This could be useful, for example, if you had a ``Task``
9-
class and you wanted to edit/create/remove many ``Tag`` objects related to
10-
that Task, right inside the same form.
7+
To edit associated entities in the same form, Symfony has the concept of
8+
Form "Collections". Think of it as a series of sub-forms, embedded into
9+
the main form.
1110

12-
Let's start by creating a ``Task`` entity::
11+
The example used in this article is a ``Task`` entity that relates to
12+
a ``Tag`` entitiy. The goal is to create a single form for tasks, that
13+
also allows to edit/create/remove many tags associated with that task.
14+
15+
Here's the ``Task`` entity::
1316

1417
// src/AppBundle/Entity/Task.php
1518
namespace AppBundle\Entity;

0 commit comments

Comments
 (0)