Symfony. After submit form does not contain a single element in the ArrayCollection for its fields from the CollectionType Symfony. After submit form does not contain a single element in the ArrayCollection for its fields from the CollectionType symfony symfony

Symfony. After submit form does not contain a single element in the ArrayCollection for its fields from the CollectionType


Can you open the Symfony Profiler when submitting your form ?

The "Forms" tab will provide you a per-field detail of how the data is handled, with Model, Normalized and View Format.

This might help you check the type of your field before and once handled by the form component.


I Think you should use VichImageType Field. In this Link you can see the right way. Why you are setting Id in App\Entity\Platform\Image manually?this is VichImageType code:

use Vich\UploaderBundle\Form\Type\VichImageType;class Form extends AbstractType{    public function buildForm(FormBuilderInterface $builder, array $options): void    {        // ...        $builder->add('imageFile', VichImageType::class, [            'required' => false,            'allow_delete' => true,            'download_label' => '...',            'download_uri' => true,            'image_uri' => true,            'imagine_pattern' => '...',        ]);    }}