You're using cake 1.1 is it? Because I'm not sure for version 1.1. But for
version 1.2 first thing is that $html->input("user_id") is already
depreciated. It now should be $form->input('user_id'). And you shouldn't
even need to specify the field directly like that. It should be just
$form->input('User') and but make sure in your Event controller you set the
User variable (ie. $this->set('User',$this->Event->User->find('list'))).
That should work, at least in version 1.2. Umm.. I've never tried with
version 1.1 though..

2008/6/3 Mee <[EMAIL PROTECTED]>:

>
> oh...I'm sorry, I've sent previous reply to Abdullah Zainul Abidin
> directly.
>
> so, connection with foreign key is alreay established. I have a "$html-
> >input("user_id")" code in view, that creates a listbox with all users
> ids inside. All I want is to have user_names instead of user_ids.
>
> thanks in advance,
> mee
>
> On 3 Чер, 04:44, Вилен Тамбовцев <[EMAIL PROTECTED]> wrote:
> > Define a $belongsTo = array('Foreign');
> > --
> > Вилен Тамбовцев
> > [EMAIL PROTECTED]
> >
> > 03.06.2008, в 4:19, Mee написал(а):
> >
> >
> >
> > > Hello everyone!
> >
> > >   I have a model with a foreign key, that links it to another model.
> > > Can you tell me how to make listbox with the field from another model,
> > > instead of it's id in current model?
> >
> > > (i.e. user_name instead of user_id)
> >
> > > thanks in advance,
> > > mee
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to