⚠ 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

why crude does'nt runs callbacks_before_insert?



BalaPerdida

BalaPerdida
  • profile picture
  • Member

Posted 12 April 2013 - 17:28 PM

I need to validate a DNI (spanish identification card). This documents have a letter depending on a calculation. Well this is a part of my code:

 

function _display()

{
... / ...
 
... / ...
 $crud->callback_before_insert('documento',array($this,'documento_callback'));
 $output = $crud->render();          
           
  return $this-> _example_output('prueba.php',$output);
       
}
    
    function _example_output($view = NULL , $output = NULL)
    {
        return $this->load->view($view , $output,TRUE);  
    }
 
    function documento_callback($post_array)
    {
        var_dump($post_array);
    }
 
 
Anyone can help me?
Thanks

victor

victor
  • profile picture
  • Member

Posted 13 April 2013 - 22:07 PM

$crud->callback_before_insert('documento',array($this,'documento_callback'));  - wrong

$crud->callback_before_insert(array($this,'encrypt_password_callback')); true


BalaPerdida

BalaPerdida
  • profile picture
  • Member

Posted 14 April 2013 - 00:09 AM

Thank you very much!!!