Re: Problem to select right value on $form->input (select) with text index

2009-10-17 Thread Marcelo Andrade
On Wed, Oct 14, 2009 at 5:41 PM, Leonardo "Hackin" Freire wrote: > $clientes = $this->Cliente->find('list', array('order' => > array('Cliente.razaoSocial ASC'))); Not sure if it helps, but the fields with more than one word must be not int the camelBack format, but underscored. $clientes = $th

Re: Problem to select right value on $form->input (select) with text index

2009-10-15 Thread Dr. Loboto
You can pass fields names to find directly: $clientes = $this->Cliente->find( 'list', array( 'fields' => array('Cliente.codigo', 'Cliente.razaoSocial'), 'order' => array('Cliente.razaoSocial ASC') ) ); On Oct 15, 3:41 am, "Leonardo \"Hackin\" Freire" wrote: > Hi dude

Re: Problem to select right value on $form->input (select) with text index

2009-10-14 Thread brian
Cake only handles integer primary keys, AFAIK. On Wed, Oct 14, 2009 at 4:41 PM, Leonardo "Hackin" Freire wrote: > Hi dudes, > I'm getting a little problem when populate a select through the > $form->input. > In my controller "Contato", where i save the client_id field, I populate an > variable c

Problem to select right value on $form->input (select) with text index

2009-10-14 Thread Leonardo "Hackin" Freire
Hi dudes, I'm getting a little problem when populate a select through the $form->input. In my controller "Contato", where i save the client_id field, I populate an variable calling "clientes" with this line: $clientes = $this->Cliente->find('list', array('order' => array('Cliente.razaoSocial ASC'