I want to submit a form via Ajax Javascript to a CakePHP funct开发者_JAVA技巧ion.
CakePHP actions collect all form fields in $this->data
. I want to convert my HTML form fields to the acceptable format i.e $this->data(array)
.
How to do this in Javascript? I'm using jQuery.
There is only one way to POST data, so the conversion must be done by cakephp.
Therefore however you submit a form, as long as it goes to the controller it should be automatically converted to $this->data
.
精彩评论