⚠ 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

callback_column in a set_relation field



rolo2012
  • profile picture
  • Member

Posted 06 August 2012 - 17:39 PM

I need to use:
$crud->set_relation('buyerid', 'user','username');
and after
$crud->callback_column('buyerid', array($this, '_format'));

but its dosen't work
please help

goFrendiAsgard
  • profile picture
  • Member

Posted 21 August 2012 - 13:13 PM

maybe you want to write this:

$crud->callback_column('buyerid', array($this, function($value, $row){return '__'.$value;}));


If that still doesn't work, please look at /topic/254-set-relation-breaks-processing-of-field-with-same-name-returned/page__p__982#entry982