⚠ 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

GC multi select drop down



sid
  • profile picture
  • Member

Posted 26 June 2015 - 10:47 AM

Hello! I want to add a multi select drop down to my gc add form.i could generate a single select drop down using set relation.but i dont know how to make it multi select drop down.please help,thank you! this is my gc function in controller

      

  
 
 
   public function paving_management()
   {
   $crud = new grocery_CRUD();  
   $crud->set_theme('datatables');
   $crud->set_table('tbl_pavings');   $crud->set_relation('color','tbl_color','color');
 
 
   $output = $crud->render();
   $this->pavings_output($output);
   }

 


Amit Shah
  • profile picture
  • Member

Posted 15 July 2015 - 19:15 PM

well the set_relation is always going to give you a single dropdown...

for multiple selection - u need to create another relation table between pavings and colors... like paving_colors

 

that u can use with set_relation_n_n ...

u can explore the example in the document to understand better.