Symfony3 forms not showing input fields when using CollectionType
<p>I'm having problem with displaying form when using CollectionType. It doesn't show newOrderCustomerType inputs, just label "Customer Id". Whats wrong? </p>

<p><a href="https://i.stack.imgur.com/cZB2W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cZB2W.png" alt="enter image description here"></a></p>

<p>newOrderCustomerType</p>

<pre><code>&lt;?php

namespace AppBundle\Form;

use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class newOrderCustomerType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder-&gt;
        add('firstname', TextType::class,array('label'=&gt;'Firstname'))-&gt;
        add('lastname', TextType::class,array('label'=&gt;'Lastname'))-&gt;
        add('email', TextType::class,array('label'=&gt;'Email'))-&gt;
        add('login', TextType::class,array('label'=&gt;'Login'));
    }

    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver-&gt;setDefaults(array(
            'data_class' =&gt; 'AppBundle\Entity\Customer',
        ));
    }

    public function getName()
    {
        return 'app_bundlenew_order_customer_type';
    }
}
</code></pre>

<p>newOrderType</p>

<pre><code>&lt;?php

namespace AppBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class newOrderType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            -&gt;add('customerId',CollectionType::class,array(
                'entry_type'=&gt;newOrderCustomerType::class,
                'allow_add'    =&gt; true,
                'by_reference' =&gt; false,
                'data_class' =&gt; 'AppBundle\Entity\Customer',
            ))
            -&gt;add('shopOrderId')
            -&gt;add('orderDate')
            -&gt;add('postBuyFormMsg')
            -&gt;add('invoice')
            -&gt;add('payType')
            -&gt;add('shipmentType')
            -&gt;add('payStatus')
            -&gt;add('save',SubmitType::class);
    }

    public function configureOptions(OptionsResolver $resolver)
    {

    }

    public function getName()
    {
        return 'app_bundlenew_order_type';
    }
}
</code></pre>

<p>And in TWIG template</p>

<pre><code>{{ form_start(orderForm) }}
    {{ form_widget(orderForm) }}
{{ form_end(orderForm) }}
</code></pre>

<p>How to make it show all input fields? </p>