I use cakephp 1.3 to create a form, I create a selection list using hasOne and belongs to the relation
my models: image, category
category hasMany image
image belongs to the category
Category tablehas two columns id and category_name
I do
$this->set('categories',
$this->Image->Category->find(
'list',
array( 'order' => 'category_name ASC' )
)
);
there is only one problem so far, the selection list just created shows the category identifier instead of category_name as option text, I know this is not cakePHP error, but I need to know the solution
any help please.
PS, if I am unclear in the question, please let me know
source
share