It looks like you're new here. If you want to get involved, click one of these buttons!
...
public $foreign_keys = array(
'location_id' => array(FUEL_FOLDER => 'fuel_categories_model', 'where' => array('context' => 'LOCATION')),
'area_id' => array(FUEL_FOLDER => 'fuel_categories_model', 'where' => array('context' => 'AREA')),
'type' => array(FUEL_FOLDER => 'fuel_categories_model', 'where' => array('context' => 'TYPE DETAILS'))
function form_fields($values = array(), $related = array())
{
$fields = parent::form_fields($values, $related);
$fields['categories_id']['label'] = 'Categories';
$fields['position']['label'] = 'Position';
$fields['location_id']['label'] = 'Location';
$fields['area_id']['label'] = 'Area';
$fields['type'] = array('label' => 'Type', 'type' => 'multi', 'options' => array('type' => array(FUEL_FOLDER => 'fuel_categories_model', 'where' => array('context' => 'TYPE DETAILS'))));
return $fields;
}
...
Comments
I've changed to:
... public $foreign_keys = array( 'location_id' => array(FUEL_FOLDER => 'fuel_categories_model', 'where' => array('context' => 'LOCATION')), 'area_id' => array(FUEL_FOLDER => 'fuel_categories_model', 'where' => array('context' => 'AREA')) ); public $has_many = array( 'type' => array(FUEL_FOLDER => 'fuel_tags_model') ); ...
Thanks a lot.