Hello to all,
I'm having trouble performing the following ... to add or edit (int) $ user_id field is not displayed. However, in columns and read the record, the name appears (relation) of the same.
Sorry if this question already exists, but sought and found.
Thanks
--
Method 'systems':
public function systems()
{
try{
$crud = new grocery_CRUD();
$crud->set_table('systems')
->set_subject('Sistema')
->columns('name', 'platform', 'responsible', 'language')
->fields('name', 'user_id', 'description', 'platform', 'responsible', 'language', 'status', 'modified')
->field_type('modified', 'datetime')
//->field_type('user_id', 'hidden', $this->auth_verify['id'])
->display_as('name', 'Nome do Sistema')
->display_as('description', 'Descrição')
->display_as('platform', 'Plataforma')
->display_as('responsible', 'Responsável')
->display_as('language', 'Linguagem')
->display_as('user_id', 'Editor')
->display_as('modified', 'Data');
$crud->set_relation('user_id','users','name');
$output = $crud->render();
$this->_example_output($output);
}catch(Exception $e){
show_error($e->getMessage().' --- '.$e->getTraceAsString());
}
}
