⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

how to add call_back_before_update in action button



DREON
  • profile picture
  • Member

Posted 07 March 2013 - 03:19 AM

i want to add call back on my action button to short cut my edit view..

 

how to call back before update on custom button..

 

i have this call back code in my edit view,

 

$crud->callback_before_update(array($this,'callback_deducted'));

 

 

}    

function callback_deducted($post_array)
        {
          $post_array['datereturned'] = date('Y-m-d');
          $post_array['action'] = ('returned');
          return $post_array;
}