muliple cascading dropdown

rtrauer

Member
Hi, i have a similar problem that I could not solve and would appreciate some help.

In my case I need to filter a consumer electronic device list to get a model_id so that I can show infra-red commands for that device. So I have 2 tables
1 - device model list with:
1.1 - id (primary key element)
1.2 - device_type (dropdown element) ex DVD, Receiver, TV etc
1.3 - manufacturer (dropdown element) ex Philips, Sony, LG, Samsung, etc
1.4 - model (text field element) ex descripton of the device model.

2 - ir_command list with:
2.1 - id (primary key)
2.2 - model_id (database join element) - linked to device model list
2.3 - button_tag (database join element) - linked to button tag list
2.4 - ir_command (text field)

There are several IR commands for each device model, ON device_model.id = ir_command.model_id

Now I need to create a list with commands for a selected device.
To select a device, the user would like to select a device_type, then select the manufacturer from a filtered list and then select the model from a filtered list.

I tried several approaches, but none of them resulted in something that worked

a) creating a new list with table join with device model list left join with ir command list.
I configured the device_type, manufacturer and model to be filter elements, using dropdown option, but couldn?t find a way to make the resulted dropdonw list be filtered by option of another element. As a result, the filter dropdown shows options that are not in the table records, since all models are listed regardless of the manufacturer chosen.
Since I created this new list using the original database tables, the elements were linked to the original elements, and I have no clue what would hapend If I selected to break that link to change the element type do join elements for example.

b) creating a new list for filtering purpose, to use a submit form to redirect to the ir command list with use elements as filter option on.
I?m halfway on it, but facing another issue that is
device_type is a database join element
manufacturer is a cascading dropdown element that is filtered by device_type.
model element is a cascading dropdown element that is filtered on manufacturer. But then I get models for the same manufacturer that belongs to different device_types. For example Philips have several TV models and several DVD models. All of them get listed in the model element filter dropdown when I select device_type = tv and manufacturer = philips.

I also tried to use the advanced where query " device_type = 'tv' " but that's a static thing.

Is there a way to use a element value stored in session when submited in another form to filter a join element or cdd element in a form called with the redirect plugin ?

Any other ideas ?

What about a CDD2 Element that whates 2 other elements ?

Hope to get some hint on this,
Regards,
rtrauer
 
Hi, i have a similar problem that I could not solve and would appreciate some help.
Its best to start a new thread, otherwise things get very confusing as two possble conversations are pooled in one thread.
I've moved your post into a new thread.

To select a device, the user would like to select a device_type, then select the manufacturer
First I would normalise your data, so put 'device_type' in its own table and alter the device type to a database join element.
Same thing for the manufacturer.

Then I'm unclear what relationship there is between a device type and a manufacturer? Your description suggests to me that there is some relationship but I don't see it defined in the table/field description given.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top