Open Zer0NimO-web opened 2 years ago
I found a solution for those who are looking for an answer. I replaced this :
->add('image', TextType::class, ['label' => 'Images'])
by this :
->add('images', FileUploadType::class, [
'label' => 'Images',
'multiple' => true,
'upload_dir' => 'public/uploads/images/',
])
Inside buildForm.
It doesn't look perfect but at least it works.
Here is what the field looks like after clicking on the trash icon :
Hello,
I'm having trouble with field type of nested properties. Let's assume we have the following entities : one product for many product options
I want to be able to edit ProductOption inside ProductCrudController.
Therefore i did a Form for the options which is like :
And i set the following line inside ProductCrudController:
The issue is image field appears as a TextField inside the form and i want it to be an ImageField.![Capture d’écran 2022-04-27 à 14 29 40](https://user-images.githubusercontent.com/54934637/165518445-7ac8bb03-5916-4c7f-9357-511a6234cca7.png)
Is there a way to force ImageField on nested ProductOption.image property ?