⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

read page not showing dropdown values



mbmtnez
  • profile picture
  • Member

Posted 02 May 2017 - 14:11 PM

Hello, I read about this problem, someone said that is a bug and we can wait for version 1.4, I have 1.5.0 and I steal having the problem, in the add, edit and list page I can see the value of the dropdown but in the read page I can see it.

 

This is my controller, thanks in advance.

 

        $this->crud->set_table('test');
        $this->crud->set_subject('Test');
        $this->crud->columns('id_test', 'show_test'); 
        $this->crud->field_type('show_test', 'dropdown',  array('1' => 'Sí', '0' => 'No'));
     
        $output = $this->crud->render();
        $data['contents'] = 'contents';
        $data = array_merge($data, (array) $output); 
        $this->load->view('template', $data);
        

 


Amit Shah
  • profile picture
  • Member

Posted 03 May 2017 - 09:44 AM

Well correct me if i am wrong - you see Si / No in the add / edit and 0/1 in the read page.

The issue is more to do with the field type rendering in the add / edit but the same rendering is not available in read.

Hence will recommend using a callback for read field. That should solve your problem eventually.

 

Happy GCing :)