I'm pretty new to CakePHP and I think this is probably a very simple
problem, but I'm not sure where I am going wrong.
I am working on the add view for one of my models - Model1. The model
belongsTo another model (Model2), which in turn belongsTo a third model
(Model3). On the add view for Model1 I'm displaying a drop-down to select
its Model2, like this:
echo $form->input(model2_id');
However, I also want to display a automagically populated drop-down for
Model3. I've tried a few things, like:
echo $form->input(Model2.model3_id');
echo $form->input(Model3.id');
The first attempt displays the correct label ('Model3') and a textbox,
however I'd like a drop-down listing all Model3 records. I set the type of
the input to 'select', which then produced an empty HTML select.
Anyone able to point me in the right direction?
Thanks,
Toby
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment