Hey that works too, and is more elegant. Thanks for the suggestion!
On Dec 5, 4:52 pm, euromark dereurom...@googlemail.com wrote:
ah thats what you mean
did you try setting $displayField of that model to name?
that should also work
On 5 Dez., 19:04, aries br...@allemana.com wrote:
Hi there,
Thanks for your response. I should have clarified my situation. I have
a form for a related Region model (HABTM relationship) that calls
$this-Form-input('Reporter'); to show a multi select list of
Reporter records. I figured that adding a virtual name field called
name would
Solution:
In the Regions controller, I have to specify the find fields, viz:
$reporters = $this-Region-Reporter-find('list', array('fields' =
array('id', 'name')));
Thanks,
-Brian
On Dec 5, 11:45 am, aries br...@allemana.com wrote:
Hi there,
Thanks for your response. I should have clarified
ah thats what you mean
did you try setting $displayField of that model to name?
that should also work
On 5 Dez., 19:04, aries br...@allemana.com wrote:
Solution:
In the Regions controller, I have to specify the find fields, viz:
$reporters = $this-Region-Reporter-find('list', array('fields'
Hello,
I'm trying to use virtual fields with Cake 2.0 and am running into a
problem. I'm trying to populate a select input with values from a
table that has no `name` field. I'm setting a virtual field called
`name` with the first_name and last_name fields, but the menu is not
populating
you might be doing sth wrong
how are you processing the result?
because Reporter__name is correct so far.
cake will then automatically merge the content of this key back to the
Model result array with the key name.
and then it should be available with
$result['Reporter']['name']
since name and