
Display a concatenated value in drop down list
- Single Page
Posted 09 March 2013 - 12:28 PM
Posted 10 March 2013 - 09:10 AM
Because the data you want to display come from two tables you need to :
1. make a model of your own (extend gc model or extend ci model)
2. make a function within your extend model that gets pkgrp and returns the profileName - className
3. within your controller in a function do something similar to this (sample code from a project of mine)
$this->load->model('itemmodel'); $activities = $this->itemmodel->get_activities("activities"); foreach ($activities->result() as $row) { $myarray[$row->id] .= $row->description; } $this->grocery_crud->field_type('interest_for','multiselect',$myarray);