In the example “dropdown country city” when choosing a country and then a state, when deselecting the country the state dropdown list and city dropdown list filters remain empty.
There is a solution?
Tnks in advance
Massimo Gagliardi
1 Answers
Hello,
This is as expected. When there is no country selected, there will be no state or city as both are dependent on country. Ideally they should be hidden if country is not selected and only shown when it’s selected.
For that you can uncomment these lines:
https://www.gridphp.com/demo/demos/appearance/dropdown-country-city.phps
$grid["add_options"]["afterShowForm"] = "function(){ setup_fields(); }"; $grid["edit_options"]["afterShowForm"] = "function(){ setup_fields(); }";
Your Answer