cake php, how to populate a drop down selection based on another drop down selection?

后端 未结 1 712
孤城傲影
孤城傲影 2021-01-26 06:30

I have a table something like this:

id  test   attr  dim
1   test1  a1    d1
2   test2  a2    d2
3   test3  a1    d3
4   test3  a1    d2

I am c

相关标签:
1条回答
  • 2021-01-26 07:28

    You can do with help of ajax->observefield

    eg:

    $options = array('url' => 'getcounties', 'update' => 'ExampleCountyI
    $ajax->observeField('ExampleStateId', $options);
    

    UPDATED

    observeField is not more available in CakePHP js helper here it's equivalent way to the same for newer CakePHP version >= 2.x

    0 讨论(0)
提交回复
热议问题