EntityHiddenTypeBundleInstallationStep 1: Download the BundleSymfony >= 2.8$ composer require qbbr/entity-hidden-type-bundleSymfony < 2.8$ composer require qbbr/entity-hidden-type-bundle 1.*Step 2: Enable the Bundle<?php// app/AppKernel.php// ...class AppKernel extends Kernel { publicfunctionregisterBundles() { $bundles = array( // ...newQbbr\EntityHiddenTypeBundle\EntityHiddenTypeBundle(), ); // ... } // ... }Usage<?php// src/AppBundle/Form/Type/MyType.phpnamespaceAppBundle\Form\Type; useSymfony\Component\Form\AbstractType; useSymfony\Component\Form\FormBuilderInterface; // for Symfony < 2.8 rm use typeuseQbbr\EntityHiddenTypeBundle\Form\Type\EntityHiddenType; class MyType extends AbstractType { publicfunctionbuildForm(FormBuilderInterface$builder, array$options) { $builder// for < 2.8 use 'entity_hidden' ->add('parent', EntityHiddenType::class, [ 'class' => 'AppBundle\Entity\MyEntity', ]); } // for < 2.8 use getName()publicfunctiongetBlockPrefix() { return'my'; } }