开发者

How do I name Ajax form fields to be recognized by CakePHP?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜