I have a dropdown that only shows the id of a table row. I like to show multiple values from that table to the user in the dropdown.
Do I need to add an array with columnames in the variabele from the controller or something like that?
Edit: In function add I've this variable
$addresses = $this->Users->Addresses->find('list', ['limit' => 200]);
In the view
echo $this->Form->input('address_id', ['options' => $addresses]);
I only want to show the values address_id, city, street, zipcode in the dropdown.
$addressespopulates the options for a foreign key$address_id. So your input code would look like$this->Form->input('address_id');. You should only need to pass theoptionsvalue when using a variable other than the one Cake is expecting (if that makes sense). :-)