Symfony3: set Custom FormType "name"/"blockPrefix" <p>I have a <code>Formtype</code>. In this <code>Formtype</code> I get over the <code>options</code>-Array in the <code>buildForm</code> function a key <code>additionalName</code>. I want to add this value to the <code>FormType</code> Name (in Symfony3 BlockPrefix). But how can I set this?</p> <pre><code>class AdultType extends AbstractType { /** * @param FormBuilderInterface $builder * @param array $options */ public function buildForm(FormBuilderInterface $builder, array $options) { $additionalName = $options['additionalName']; $builder -&gt;add('account', TextType::class,array( 'label' =&gt; 'account', 'required' =&gt; false, )) ; } /** * @param OptionsResolver $resolver */ public function configureOptions(OptionsResolver $resolver) { $resolver-&gt;setDefaults(array( 'data_class' =&gt; 'My\Bundle\WebsiteBundle\Model\Adult', 'csrf_protection' =&gt; true, 'cascade_validation' =&gt; true, 'name' =&gt; "" )); } /** * @return string */ public function getBlockPrefix() { //Here I need the $options['additionalName'] return 'my_bundle_websitebundle_adult_'.$options['additionalName']; } </code></pre> <p>I tried allready to set a variable private <code>$additionalName;</code> on the top of the class, set it in the <code>buildForm</code> function and get access to it with <code>$this-&gt;additionalName</code> in the <code>getBlockPrefix</code> Function. But the value in <code>getBlockPrefix</code> is empty. SO I think the <code>getBlockPrefix</code> is called before the <code>buildForm</code>.</p> <p>The Type is beeing called from another form:</p> <pre><code>$builder-&gt;add('adult', AdultType::class, array( 'additionalName' =&gt; $options['name'] )); </code></pre> <p>Thanks for any help!</p>