If the view is called from the users controller (the one that references the
languages model), then try using:
echo $form->input('language_id');
instead. It should generate the combo with the names instead of the id.
Regards,
Luiz Poleto
2008/9/9 Brian Fidler <[EMAIL PROTECTED]>
> I'm sure this is a pretty simple solution so I apologize in advance. I just
> used bake to create some administrative panels associating a users table
> with a languages table. There are 8 languages and when I add a user I want
> to be able to pick the languages they speak from a drop down list.
>
> The view that was created by the bake script creates everything but instead
> of listing the language it lists the id field of that table. How can I get
> the 'language' field of that table into the dropdown?
>
> this is what displays in the field...
>
> echo $form->input('Language');
>
> and this is my Language model...
> class Language extends AppModel {
>
> var $name = 'Language';
>
> //The Associations below have been created with all possible keys,
> those that are not needed can be removed
> var $hasAndBelongsToMany = array(
> 'Applicant' => array('className' => 'Applicant',
> 'joinTable' => 'applicants_languages',
> 'foreignKey' => 'language_id',
> 'associationForeignKey' => 'applicant_id',
> 'unique' => true,
> 'conditions' => '',
> 'fields' => '',
> 'order' => '',
> 'limit' => '',
> 'offset' => '',
> 'finderQuery' => '',
> 'deleteQuery' => '',
> 'insertQuery' => ''
> )
> );
>
> }
>
>
> thanks.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---