Closed Baloobear closed 2 years ago
hi @Baloobear, it would be nice if you check what printed in browser console.
Hi @helios-ag,
after there was no browser console output I did a quick check with a standard (non EasyAdmin) form including a field of the type ElFinder::class
which works as expected so I took a deeper look into my config.
Finally I got the reason why the widget template hasn't been loaded: the widget form type template must be added to the CRUD controller (similar to the EasyAdmin 2 config).
I did it with the following code in my CrudController:
public function configureCrud(Crud $crud): Crud
{
return $crud
// ...
->addFormTheme('@FMElfinder/Form/elfinder_widget.html.twig')
;
}
With this done the form renders the correct ElFinder form widget and one can start from this point to change the widget template to fit the personal needs etc.
So maybe you can extend the docs with a section for EasyAdmin 3.x/4.x with this info.
Greetings, Dennis
@Baloobear thanks for sharing your solution! Appreciate that!
Hello everyone.
Describe the bug
When I try to integrate a form field of the type ElFinderType in my EasyAdmin crud controller I only get a simple text field without any function.
Even trying to integrate the infos related to https://stackoverflow.com/questions/64480120/using-elfinder-on-symfony-i-cant-select-images or #406 (incl. overwriting the templates and converting the given infos to the updated EasyAdmin 3.x/4.x configuration) does not help in any way. It also seems that the widget template (neither the original one or the own in
templates/bundles/FMElFinderBundle/Form
) seems not to be used.To Reproduce
Here's the code I'm using:
CrudController
_fmelfinder.yaml
Additional context
Used packages/libs:
Any help is appreciated.
Kind regards, Dennis