I'm having a problem wanting to fill a Combobox / dropdownList in CakePHP
I fill it up like this:
public function obtComunas()
{
$Comuna = $this->ManComuna->find()->select(['codigo_comuna', 'descripcion'])->toArray();
return $Comuna;
}
and at the hearing I show it like this:
echo $this->Form->input('codigo_comuna',
array(
'type' => 'select',
'options' => $Comunas,
'empty' => false
));
The problem is that I do not know how to tell the combo what the value is and what the text is, therefore it looks like this:
Thank you in advance for any comments.
Greetings.