Ivan Borysenko Ivan Borysenko - 6 months ago 76
Ajax Question

Sonata Admin Dependent Select ajax returns empty value

I have form with dependent selectBoxes.
I read tutorial http://symfony.com/doc/current/form/dynamic_form_modification.htmL

But in my representation ajax always return empty value
I use Sonata Admin


You controller Action must implement method:

 if ($request->isXmlHttpRequest()) {
        return $this->render('MyBundle:Task:ajax-template.html.twig', [
           'form' => $view,

And template:

{{ form_start(form) }}
{{ form_end(form) }}