Código PHP:
use MyBundle Form EmailType;
class MemberType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('member', new PersonType(), array(
'data_class' => 'MyBundle\Entity\Person'
))
->add('emails', 'collection', array(
'type' => new EmailType(),
'label' => false,
'by_reference' => false,
'allow_delete' => true,
'allow_add' => true,
))
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'MyBundle\Entity\Members',
'validation_groups' => array('default')
));
}