Dear all,
How to include multiple pages by using grocery crud with CodeIgniter?
Here my code:
public function _example_output($output = null)
{
$this->load->view('example',(array)$output);
}
public function users_management()
{
$crud = new grocery_CRUD();
// $crud->set_theme('datatables');
$crud->set_table('users');
$crud->columns('username','email','gender','photo','g_id');
$crud->set_relation('g_id','user_groups','description');
$crud->display_as('g_id', 'User group');
$crud->set_subject('Employee');
$crud->field_type('password', 'password');
$crud->set_field_upload('photo','assets/uploads/files');
$crud->callback_add_field('gender',array($this,'add_field_callback_1'));
$crud->callback_edit_field('gender',array($this,'add_field_callback_1'));
$output = $crud->render();
$this->_example_output($output);
}
function add_field_callback_1()
{
return ' <input type="radio" name="gender" value="Male" /> Male
<input type="radio" name="gender" value="Female" /> Female';
}