Welcome Guest, Not a member yet? Register   Sign In
extend DB table with edit by field
#5

i take a look, and found it have to work by
Code:
callback

so i try and try and now it work´s.

i write a new functions
PHP Code:
function modified_edit_by($post_array$primary_key) {
        
$post_array['edit_by'] = $this->session->userdata('name');
        return 
$post_array;
    } 

and add the fields
PHP Code:
$crud->change_field_type('edit_by','invisible'); 
PHP Code:
$crud->callback_before_update(array($this,'modified_edit_by')); 

i need a bit to found out that "name" is the session value for username. But i look in the headercode of my headerview and found it.

Thank you for helping.
Reply


Messages In This Thread
extend DB table with edit by field - by Lordi - 11-30-2014, 08:24 AM
RE: extend DB table with edit by field - by Lordi - 12-06-2014, 08:14 AM
RE: extend DB table with edit by field - by Lordi - 12-24-2014, 03:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB