On Apr 9, 5:13 pm, Toby <[email protected]> wrote:
> Hi there,
>
> I have 4 table that relate to this problem...
> - Products
> - Types
> - Sizes
> - StockItems
>
> I have set CakePHP so that each product has a Type.
> I am now sorting out the StockItems controller/views.  Each StockItem
> will relate to a single Product and will specify the Size of the
> StockItem.
>
> My question is... On the StockItem Edit page, how do I limit the Size
> drop-down to only display the Sizes that relate to the Type of the
> Product?

you use a condition, like you would for any find. i.e.

$this->set('sizes', $this->StockItem->Size->find('list', array
('conditions' => edit here));

hth,

AD
--~--~---------~--~----~------------~-------~--~----~
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