Skip to content

Commit 2e83f14

Browse files
committed
Merge branch '6.2' into 6.3
* 6.2: Tweaks [FormCollection] mention Symfony UX live collection
2 parents 2ef76f2 + e6290fb commit 2e83f14

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

form/form_collections.rst

+7
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,12 @@ Previously you added two tags to your task in the controller. Now let the users
213213
add as many tag forms as they need directly in the browser. This requires a bit
214214
of JavaScript code.
215215

216+
.. tip::
217+
218+
Instead of writing the needed JavaScript code yourself, you can use Symfony
219+
UX to implement this feature with only PHP and Twig code. See the
220+
`Symfony UX Demo of Form Collections`_.
221+
216222
But first, you need to let the form collection know that instead of exactly two,
217223
it will receive an *unknown* number of tags. Otherwise, you'll see a
218224
*"This form should not contain extra fields"* error. This is done with the
@@ -702,4 +708,5 @@ the relationship between the removed ``Tag`` and ``Task`` object.
702708
.. _`@a2lix/symfony-collection`: https://github.com/a2lix/symfony-collection
703709
.. _`symfony-collection`: https://github.com/ninsuo/symfony-collection
704710
.. _`ArrayCollection`: https://www.doctrine-project.org/projects/doctrine-collections/en/1.6/index.html
711+
.. _`Symfony UX Demo of Form Collections`: https://ux.symfony.com/live-component/demos/form-collection-type
705712
.. _`Stimulus`: https://symfony.com/doc/current/frontend/encore/simple-example.html#stimulus-symfony-ux

0 commit comments

Comments
 (0)