Hello everyone!
Maybe I do something wrong, no I'm sure I do something wrong :) and thats why I'm here.
I would like to make a multiple select box in my crud Add record section which consist data from an other table and I'm not sure how to fill the select box?
What I done yet:
function torzsadat_karbantartas_management() { $crud = new grocery_CRUD(); $crud->set_subject('Karbantartás törzsadat'); $crud->set_table('torzsadat_karbantartas'); $crud->set_relation('torzsadat_apartman_id','kodtar_apartman_type','type'); $crud->display_as('torzsadat_apartman_id','Apartman tÃpus'); $crud->set_relation('kodtar_karb_tev_id','kodtar_karbantartasi_tev','type'); $crud->field_type('kodtar_karb_tev_id', 'multiselect'); $crud->display_as('kodtar_karb_tev_id','Karbantartási tevékenység'); $output = $crud->render(); $this->_main_output($output); }
And I got this error msg:
A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: libraries/grocery_crud.php
Line Number: 2157
If I remove the field_type line the normal dropdown slect box is working well.
How could I transform it to a multiselect box?
Best regards, David