I Create a Extra Field in My App, And the Field doesn't exist from table in the database,
How I can Get the Value in function Callback before Insert or Update??
My code :
[php]
$crud->fields('roleName','prv_list');
$crud->callback_field('prv_list',array($this,'group_prv_list'));
$crud->callback_before_insert(array($this,'before_insert_update_group_prv_list'));
$crud->callback_before_update(array($this,'before_insert_update_group_prv_list'));
function before_insert_update_group_prv_list($post_array, $primary_key = null) {
if($primary_key !== null) {
//Hot to get value From $post_array to update to Database
}
else {
//Hot to get value From $post_array to Insert to Database
}
return $post_array;
}
[/php]
The prv_list Not In Table of Database, Just a Custom View
And Can we do print_r($post_array) ??
And The View Is
[attachment=241:View_crud.png]
Thanks, And Sorry My English is Very Poor
