i have a callback_add_field, which looks like this
$this->grocery_crud->fields(.... , 'Test', ...);
$this->grocery_crud->callback_add_field('Test',array($this,'getTest'));
function getSpiele() {
$out = "<input id='field-Test' type='text' name='Test' />";
return $out;
}
And a callback_after_insert:
$this->grocery_crud->callback_after_insert(array($this, 'getTest'));
function getTest($post_array,$primary_key) {
$test = array(
"id" => $primary_key,
"test" => $post_array['Test']
);
$this->db->insert('test', $test);
}
using this, works fine, but the $post_array['Test'] doesn't work, why, how can it be solved?
$test = array(
"id" => $primary_key,
);
Thanks in advance,
R2D2