Jump to content

How to display the country state and city in dropdown and having dependency on each other

codeigniterajax grocery crud

  • Please log in to reply
1 reply to this topic

#1 Tarun Malviya

Tarun Malviya


  • Members
  • Pip
  • 3 posts

Posted 07 March 2017 - 06:16 AM

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->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('city', $this->config->item('tbl_prefix').'country_region_cities', 'city_name');

#2 xheradon


    Advanced Member

  • Members
  • PipPipPip
  • 47 posts
  • LocationSpain

Posted 07 March 2017 - 03:16 PM


Also tagged with one or more of these keywords: codeigniterajax, grocery crud

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users