Jump to content


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

edit add custom field custom field

  • Please log in to reply
No replies to this topic

#1 Aif

Aif

    Newbie

  • Members
  • Pip
  • 1 posts

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.







Also tagged with one or more of these keywords: edit, add, custom, field, custom field

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users