Values from a FK comes from the model as exactly the same way than a list.
In the view.php.html file, find the declaration of this list (edit input or filter, or else...)
Exemple : here a FK combo initialization in $lists:
$model_attribut =& JModel::getInstance('attributs', 'Demo120Model');
$model_attribut->addOrder('a.title'); //ADD THIS
$lists['fk']['attribut'] = $model_attribut->getData();
You can also create a PREDEFINED reusable query in your model (collection)
function _buildQuery_my_predefined_query()
{
$this->addOrder('a.title'); //POSSIBLE HERE
$query = ' SELECT a.*'
. $this->_buildQuerySelect()
. $this->_buildQueryJoin() . ' '
. $this->_buildQueryWhere()
. $this->_buildQueryOrderBy()
. $this->_buildQueryExtra()
;
return $query;
}
and call it in the VIEW file :
$model_attribut =& JModel::getInstance('attributs', 'Demo120Model');
$model_attribut->active('predefined', 'my_predefined_query'); //CALL IT HERE
$lists['fk']['attribut'] = $model_attribut->getData();