If your UserType table has some a name or title field cake will
automatically use it when populating drop down lists created with
Model::find( 'list' ).

If you have a field that you use as a group name or title - which it
seems you do - that isn't called name or title you have to set the
displayField property in the model and perhaps empty the cake model
caches. I think simply setting debug in core.php to 1 and refreshing
should work.

http://book.cakephp.org/view/1062/displayField explains it better and
has sample code.


On Jul 20, 11:12 pm, sathyashrayan <[email protected]> wrote:
> Dear group,
>  I am a beginner in cakePHP. I have a users table with normal users
> filed and one filed pointing to a user type table's PK(FK). When
> filling the user form, the user type is shown as select,option. I have
> bake the user type model. And used "hasOne" association when i do the
> user model. What i am getting is the list of user type IDs rather than
> "user type" itself. But in a tute of cake cookbook which has the same
> kind of code for ACL, has the “select/option” correctly with values. I
> have supplied the pastebin of the code. But i am not able to
> understand how the list is getting displayed rather than IDs.  Please
> help me.
> Code:
>  http://pastebin.com/Un0WtsgJ

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to