fastadmin 城市三级联动
1.mysql
2. add.html
1 <div class="form-group"> 2 <label class="control-label col-xs-12 col-sm-2">{:__('省市区')}:</label> 3 <div class="col-xs-12 col-sm-8"> 4 <div class="form-inline" data-toggle="cxselect" data-selects="province,city,area"> 5 <select class="province form-control" name="row[province_id]" data-url="ajax/area"></select> 6 <select class="city form-control" name="row[city_id]" data-query-name="province" data-url="ajax/area"></select> 7 <select class="area form-control" name="row[area_id]" data-query-name="city" data-url="ajax/area"></select> 8 </div> 9 </div> 10 </div>
3. edit.html
1 <div class="form-group"> 2 <label class="control-label col-xs-12 col-sm-2">{:__('省市区')}:</label> 3 <div class="col-xs-12 col-sm-8"> 4 <div class="form-inline" data-toggle="cxselect" data-selects="province,city,area"> 5 <select class="province form-control" name="row[province_id]" data-url="ajax/area"> 6 <option value="{$row.province_id|htmlentities}"></option> 7 </select> 8 <select class="city form-control" name="row[city_id]" data-query-name="province" data-url="ajax/area"> 9 <option value="{$row.city_id|htmlentities}"></option> 10 </select> 11 <select class="area form-control" name="row[area_id]" data-query-name="city" data-url="ajax/area"> 12 <option value="{$row.area_id|htmlentities}"></option> 13 </select> 14 </div> 15 </div> 16 </div>