Question

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 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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top