I\'ve got a problem with a Symfony2 generated CRUD form. (With MongoDB Documents, but I do not think that this is related)
In my controller\'s createAction() method,
If you are sending datas via AJAX, you may have missed to include the form's name on your datas keys and therefore are "victim" of …
# line 100 of Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php
// Don't submit the form if it is not present in the request
Which means, while trying to handle the request, the request processing mechanism did not find your form's name inside GET/POST datas (meaning as an array).
When you render a form the usual way, each of its fields contain your form's name as a prefix into their name attribute my_form[child_field_name].
When using ajax, add your form's name as a prefix in datas !
data : {
"my_form" : {
"field_one" : "field_one_value"
...
}
}