This topic is locked

Dependent dropdown chain

10/15/2006 1:01:20 AM
PHPRunner General questions
jwoker author

Here is an abreviation of the tables I'm using
Manufacturer.id, Manufacturer.name

Product.id, Product.name, Product.manufacturerID, Product.colorgroup

Color.id, Color.name, Color.colorgroup
I have the dependent dropdown working from Manufacturer to Product but since productID is not stored in Color I can't figure out how to display a "group" of colors in the Color dropdown. Is there a way?

J
Jane 10/16/2006

Hi,
select color.colorgroup in the Category control dropdown box, product.colorgroup in the Category field dropdown box on the "Edit as" settings dialog on the Visual Editor tab for the Color table.

jwoker author 10/16/2006

Thanks the reply Jane - but I don't think I did a good job of explaining my situation.
I am designing the add page for table Order and specifically filling fields:
Order.manufacturerid

Order.productid

Order.productcolorid
-Order.manufacturerid "edit as" is simple lookup from Manufacturer table.

-Order.productid "edit as" is dependent lookup with Link Field Product.id, Display Field Product.name, Category control Order.manufacturerid, Category field Manufacturer.id

-Order.productcolorid "edit as" is dependent lookup with Link Field Color.id, Display Field Color.name, Category control, [[this is where my problem is]], Category field [[this is where my problem is]]
I need a list of all colors where Product.colorgroup matches Color.colorgroup. If I still need to go to the Color table and change the "edit as" for Color.colorgroup please tell me what should go into Link field and Display field as well as Category control and Category field.
Thank you,

Peter

J
Jane 10/17/2006

Peter,
I recommend you to add new field to the Color table (ProductID, for example).

Then select Color.id as Link field, Color.name as Display field, Order.productid in the Category Control dropdown box, color.ProductID in the Category Field dropdown box.