/** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->remove('attributes')->add('type', 'choice', array('label' => 'Type', 'choices' => Archetype::getTypeLabels(), 'expanded' => true))->add('widgets', 'collection', array('required' => false, 'type' => 'sylius_product_archetype_attribute_widget', 'prototype' => false, 'allow_add' => true, 'allow_delete' => true, 'by_reference' => false)); }