is there a way in symfony easyadmin I can configureFields of type symfony ux Dropzone ??
I used this method but when I drag drop, the preview image does not show ,any help
yield Field::new('imageFile')
->onlyOnForms()
->setFormType(DropzoneType::class);
I've figured out a way to achieve this;
twig:
paths:
'%kernel.project_dir%/vendor/symfony/ux-dropzone/templates': CustomDropzoneNamespace
yield Field::new('imageFile')
->setFormType(DropzoneType::class,)
->addFormTheme('@CustomDropzoneNamespace/form_theme.html.twig')
public function configureAssets(): Assets
{
return Assets::new()
->addWebpackEncoreEntry('backend');
}
where "backend" is a webpack entry that loads the stimulus js controller