Joining two fields to create one (eg to get somebodys name by combining firstname and surname)
You need to create a “VirtualField” in the model;
public $virtualFields = array('fullname' => 'concat(Patient.firstname, "-", patient.surname)');
Then in your controller, to get a drop downlist;
$patients = $this->Exercise->Patient->find('list',array('fields'=>array('fullname')));
Credit to:
http://stackoverflow.com/questions/11822942/cakephp-display-multiple-fields-in-a-single-drop-down