In Symfony 3 / PHP 7, I need a form who accept an array of mixed type (string, int and array). "entry_type" param for CollectionType only accept a unique Type. How can I have a mixed type ?
$builder
->add('value', CollectionType::class, array(
'entry_type' => ?,
'allow_add' => true,
'allow_delete' => true,
));
You could use embed forms. In your custom form type you can define multiple input fields for your need and than use it in your CollectionType.
Use in as entry_type like this:
More information: https://symfony.com/doc/current/form/form_collections.html