EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

Form rendering and validation when overrideTemplate

Open butachan opened this issue 3 years ago • 0 comments

Hi, my questions may look trivial but I cannot find answer in docs.

In my project I have an entity with latitude, longitude and address properties. I use leaflet to enable completing these field by clickin on a map. So I use public function configureCrud(...)... { return $crud ->overrideTemplate('...mapZone.html.twig'); } since each field depends on the map.

First I don't know if it is a good approach for my problem.

How to pass the data in my mapZone.html.twig ? How can I save my input from the twig ? Should I use a form ? In that case, where can I create it to render it ? How to validate the form when submitted ? Should I use a standard controller to use a form ? If so, how to connect it with the crudcontroller ?

butachan avatar Aug 09 '22 10:08 butachan