when i use this code for city state country for showing dropdown i am not getting proper dependency. i want to show the all the state and city according to selected country in dropdown the below code i have written but not working proper
$crud->set_subject('Doctors');
$crud->set_table($this->config->item('tbl_prefix').'doctors');
$crud->columns('doctor_image', 'doctor_resume', 'doctor_name', 'phone_number', 'speciality', 'experience','status');
$crud->fields('application_id', 'doctor_image', 'doctor_name', 'street_name', 'zip_code', 'phone_number','landline_number','date_of_birth','country','state','city','speciality','joining_date','experience','doctor_detail', 'doctor_resume','status');
$crud->set_relation('country', $this->config->item('tbl_prefix').'country', 'country_name');
$crud->set_relation('state', $this->config->item('tbl_prefix').'country_regions', 'region_name');
$crud->set_relation_dependency('region_id','country_id','country');
$crud->set_relation('city', $this->config->item('tbl_prefix').'country_region_cities', 'city_name');
$crud->set_relation_dependency('city_id','country_id','city');