Multiple entities in one Symfony 2 form

Case: User belongs to Account entity and in registration form I want to create Account for him.

First I have simple registration form from FOSUserBundle. To extend it you have to create new form type which contains fields from other entity. In my example I have only name required to create new Account.
Continue reading “Multiple entities in one Symfony 2 form”