Referencing dropdown fields in data filter

zebrafilm

Member
It seems a simple question but I only know the PHP version...

One form based on several separate lists that fill the drop downs
These drop downs need to be filled based on the previous choices (except for the first one off course).

Setup:
one list about truck_brands with id and name field
one list about truck_types with id, name and brand field (matching truck_brands.id above)

List / form with drop downs where people select the brand-name, then the next drop down needs to adjust its listing in the drop down for that listing

Seems easy to make a Dbjoin field, get the ID as value and the name as label. Works

Second is the truck-type, get the DB join of the right list, set the value to the ID, label to the type-name

Now I should add a WHERE line but can't find the right way to pull the value from the first dropdown and connect it to the selection of the second
How do I reference to the drop down? the element name is truck1___truck_merk, in php I can use the _raw but how to compose a Filter for the data join ?

WHERE {thistable}.type_merk = {thistable}.truck_merk

Clearly does not work.

Element name of the the first drop down: truck1___truck_merk
Element name of the second drop down that needs to be filtered: truck1___truck_type

Element field of the supporting tables:
duc_merken___id
duc_typetruck___type_merk
 
yes its compatible - you may need to get it from github though, I can't remember if its included as part of the base install.
You're completely on the right track - splitting things into discreet describable objects/tables/lists is completely the right way to go
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top