Symfony2 Form Collection Tutorial

The Symfony2 form component is amazing.

However, when you're using it and you get stuck, it can be incredibly confusing and frustrating.

A good few years back I can remember the first time I encountered Symfony's form component and the concept of handling many to many relations just would not seem to make sense to me. A large part of this frustration led to me recording Symfony2 tutorial videos in the first place.

In this short tutorial series we will cover how to use Symfony when handling forms with 'collections' of related data.

The form collection field type sounds scary. But like many things Symfony, once you get your head round the basic concept, the harder stuff no longer seems so hard.

This will be useful to you if you need to accept multiple options on a select list for example, and those options are values coming from some other Entities. Or you have read or been directed to this cookbook article and wondered just what the hell it was talking about.

Note - these videos were recorded a few years back, and whilst the content is still relevant, the Symfony version is older than you may be expecting. Also, I mention A6 Software at the start of the videos rather than CodeReviewVideos - again, this is because of the videos age.


# Title Duration
1 Introduction to the Symfony Form Collection Field Type 06:47
2 Adding New Items To Our Collection 08:48
3 Removing Existing Items from a Symfony Form Collection 07:04
4 Persisting Additions to a Symfony Form Collection 09:40
5 Deleting Records from our Form Collection 11:37

Code For This Course

Get the code for this course.

Share This Course

If you have found this course helpful, please share it.

Presented by

Christopher Moss

Christopher Moss

Hi, I'm Chris and welcome to In this video you will learn about... :)