⚠ 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

Has the problem(set_relation with callback_column problem solved) been solved with new version?



Sonelal Singh
  • profile picture
  • Member

Posted 30 September 2015 - 07:25 AM

Hi friends,
 
Problem : - callback_column and set_relation together - set_relation overrides callback_column.
 
​I am struggling with this from long time and just want to know if this issue has been fixed or not from new version of Grocerycrud
 
Even below provided workaround is also not working in my case.
 
$crud->callback_column($this->unique_field_name('vrsta_id'),array($this,'valueToEuro'));
$crud->set_relation('vrsta_id','vrsta','{vrsta_id}');
 
 
function unique_field_name($field_name) {
     return 's'.substr(md5($field_name),0,8); //This s is because is better for a string to begin with a letter and not with a number
}