my controller .
$times=$this->Time->find('list',array('fields'=>$this->Time->virtualFields['name_price'] ));
$this->set('time',compact($times));
and i added below line in my model Time
public $virtualFields = array('name_price' => 'concat(Time.varaddress1, "-", Time.varaddress2)');
and my ctp file is below
<?echo $this->Form->input('intaddressid', array(
'options' => $time,'label'=>false,'empty' => '(Select Information)'
,'class' => 'form-control border_none'
));?>
but now in output i got nothing in select filed.!!
and when i echo $time i got `Array ( )
and i want in select field
<option>varaddress1,varaddress2</option>
You need to change your controller code like as :