开发者

Cakephp: cascading select boxes in a view

I need a form with cascading select boxes where the option selected in one affects the options contained in the other. Does anoyone have a sample code that implements this? Is开发者_C百科 it just a matter of building ajax code into the .ctp file to repopulate the 2nd select control?

BTW, I'm using cake 1.3.7.


I would suggest to implement a special action for the second select box in your controller, that is called via ajax and just gets the data depending on the input

function get_second_sb_data($in) { .. }

and return a json object, to populate the other SB

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜