Explorar o código

add dataType to jquery ajax submit to append a form field

Roel Sint %!s(int64=13) %!d(string=hai) anos
pai
achega
94fcfe3a2a

+ 1 - 0
Resources/views/CRUD/edit_orm_one_association_script.html.twig

@@ -39,6 +39,7 @@ This code manage the one-to-many association field popup
                 'uniqid':    sonata_admin.admin.root.uniqid
             }) }}',
             type: "POST",
+            dataType: 'html',
             data: { _xml_http_request: true },
             success: function(html) {
                 jQuery('#field_container_{{ id }}').replaceWith(html); // replace the html