⚠ 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

Strange behavior of set_relation() with filtered records



Ducsi

Ducsi
  • profile picture
  • Member

Posted 17 September 2015 - 21:10 PM

Hello,

I try to use set_relation with filter.

$this->grocery_crud->set_relation('cabinet_id','cabinets','Name',array('isFree'=>'1'));

During add method it is work fine, I can only select those records from the related table where the filtered status is met.

BUT!
On edit, the filed from the related table became empty(!), I cannot save the edit (the field is required)

I can only choose a new record from the dropdown list, which is not the expected behavior form my case..

How to solve this?

Thanks