Hi all, i'm new in GC. i have used library ajax_grocery_crud for dependant dropdown, but the second dropdown not filtering value based on first selected dropdown value.
Here is my code
public function surat()
{
$template = $this->Surat_model->get_template();
$this->load->library('ajax_grocery_crud');
$crud = new ajax_grocery_CRUD();
$crud->set_theme('bootstrap');
$crud->set_table('surat');
$crud->set_relation('jenis_surat_id','jenis_surat','jenis_surat');
$crud->display_as('jenis_surat_id','Jenis Surat');
$crud->set_relation('kode_klasifikasi','klasifikasi_surat','nama_klasifikasi');
$crud->display_as('kode_klasifikasi','Klasifikasi');
$crud->set_relation('sub_klas_id','sub_klasifikasi_surat','nama_subklas');
$crud->display_as('sub_klas_id','');
$crud->set_relation_dependency('sub_klas_id','kode_klasifikasi','kode_klasifikasi');
$crud->set_relation('sub_subklas_id','sub_sub_klasifikasi_surat','nama_sub_subklas');
$crud->display_as('sub_subklas_id','');
$crud->set_relation_dependency('sub_subklas_id','sub_klas_id','sub_klas_id');
$this->load->library('gc_dependent_select');
$crud->set_primary_key('nipp','pegawai');
$crud->set_relation('pengirim','pegawai','employee_name');
$crud->display_as('pengirim','Pengirim');
$crud->set_field_upload('lampiran','assets/uploads/files');
$crud->set_relation_n_n('penerima', 'detil_penerima', 'pegawai', 'id_surat', 'nipp', 'employee_name');
$crud->set_relation_n_n('tembusan', 'detil_tembusan', 'pegawai', 'id_surat', 'nipp', 'employee_name');
$crud->set_relation_n_n('pemeriksa', 'detil_pemeriksa', 'pegawai', 'id_surat', 'nipp', 'employee_name');
$crud->change_field_type('dibuat_oleh','invisible');
$crud->unset_texteditor('catatan');
$crud->unset_fields('no_urut','pengirim','divisi_pengirim','revisi','status');
$crud->columns('tgl_surat','perihal','pengirim','dibuat_oleh','penerima');
$crud->fields('jenis_surat_id','kode_klasifikasi','sub_klas_id','sub_subklas_id','tgl_surat','perihal','isi_surat','lampiran','prioritas','keamanan','pengirim','penerima','tembusan','pemeriksa','catatan');
$output = $crud->render();
$output->extra = $template;
$this->_home_output($output);
}
thanks in advance