I'm new to CakePHP and am encountering a difficulty to display the data in the right way.
// src/Template/Bookmarks/add.ctp
echo $this->Form->control('user_id', ['options' => $users,'empty' => 'Selecione']);
The above excerpt shows me a select with the user ID, which is my foreign key, but despite wanting to keep the value ( value=""
) of the field as the ID, in the view would like the user's email. Is there any simple way to change this view?