I\'m trying to build app based on REST api ang AngularJS. I\'ve been following this tutorial http://npmasters.com/2012/11/25/Symfony2-Rest-FOSRestBundle.html but have to cha
If you are adding a single SubmitType button or similar, you use the solution Chausser indicated
$entity = new Task();
$form = $this->createForm(new TaskType(), $entity)->add('submit','SubmitType::class');
However, in case you are using a CollectionType and embedding a set of sub forms, you need to include 'allow_add' => true in your parameters for that type. For example, in your EntityType form builder:
$builder->add('subEntities', CollectionType::class, array(
'entry_type' => SubEntityType::class,
'entry_options' => array('label' => false),
'allow_add' => true,
))
Make sure you do that for all levels of embedding if you have multiple levels.