⚠ 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

Can one edit field use the value of the other fields?



Aif
  • profile picture
  • Member

Posted 14 April 2015 - 08:40 AM

Hi,

I want to know when I use callback_field() to custom an edit field, can I use the value of the other fields in the callback function? I know we can pass $primary_key in the callback function, so I can use Model to get the entire row of the data. But if there is any way more efficient?

For exemple:

$crud->callback_field('column1',array($this,'_callback_test'));

 

function _callback_test($value = '', $primary_key = null)
    {
        return $value.' I want the value of column2 here: '.$valueColumn2;
    }

 

 

 

Thanks.