Dependent Dropdown box CakePHP 3

前端 未结 1 1936
终归单人心
终归单人心 2021-01-29 14:07

I have created a countries, cities and customers table and i\'m trying to ensure that when I add a new customer from a drop down I can select a country and then a city related t

1条回答
  •  生来不讨喜
    2021-01-29 14:37

    You can try Chained Selects Plugin for jQuery Chained Selects Plugin for jQuery and Zepto

    Required Source files:

    ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
    jquery.chained.min.js

    Example:

    $(document).ready(function() { 
        $("#cityId").chained("#countryId");
    });
    

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