form_fields (type=multi,mode=multi)
I have a model with a $has_many for fuel_users. It shows the multi-selections and keeps them in the fuel_relationships table.
The selection wants to show the fuel_users.user_name in the selection, but I want to show first_name+last_name.
I have it doing this, but I lose the users that are selected.
In other words, I lose the ['users']['value'] data.
Here is what it looks like if I leave it alone:
[users] => Array
(
[label] => Users
[type] => multi
[options] => Array
(
[1] => admin
[2] => woodhod1
[3] => searsj1
)
[value] => Array
(
[0] => 2
[1] => 1
[2] => 3
)
[mode] => multi
[module] => fuel_users
)
This is what it looks like when I modify it:
[users] => Array
(
[label] => User
[type] => multi
[mode] => multi
[options] => Array
(
[2] => Dan Woodhouse
[1] => Jeff Galbraith
[3] => Jeff Sears
)
[module] => fuel_users
)
What am I missing that would fill in the ['users']['value'] data?
Comments
$CI =& get_instance();
$CI->load->module_model(FUEL_FOLDER, 'fuel_users_model');
$user_options = $CI->fuel_users_model->options_list();
$fields['users']['options'] = $user_options;