Make it camel-cased: $UserPrefixes On Fri, Feb 8, 2013 at 12:55 PM, NikNik <[email protected]> wrote: > Hello, > where is the newbie section of this forum? :-) > > I am trying to populate a select in a normal "user" edit view taking data > from another table called user_prefixes (which hasMany user that belongsTo > user_prefixes ) > > > "user" table: user.id, user.name, user.user_prefix_id > "user_prefix" table: id, name > > everything is ok until the end of the controller. > > $user_prefixes = $this->User->UserPrefix->find('list'); > $this->set(compact('user_prefixes')); > > /* > var_dump($user_prefixes); > returns array(1=>'Sir', 2=>'Madam', 3=>'Dear Sir.', 4=>'And so on') > */ > > > in the View/User/edit.cpt > > echo $this->Form->input('user_prefix_id'); > > An empty select is shown. > > > > With single word table names everything is ok. > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > >
-- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
