Help with cascading dropdowns

tilbellos

New Member
Hello, we are building a form for a fishing club and we want our members to send us their fishing reports and i have some problems with some fields. I want 3 dropdowns (ecosystem, river, location). I have made a second list that contains the data of these 3 options, (i dont know if this is right). The second ccd (river) is depending on the first option (ecosystem) and it works but the 3rd (location) i cant make it work, i only see plese select so i need some help on how i must buld the lists and the elements. i just want the second dropdown depend on the first and the 3rd dropdown depend on the second option. i think it is simple but i am trying one week with no luck
 
Can you describe your tables?

I presume they are something like ...

ecosystems:
id, ecosystem

rivers:
id, river, ecosystem_id

locations:
id, location, river_id

... and the "rivers" CDD watches "ecosystems" and uses ecosystem_id as the FK (foreign key), and "locations" watches "rivers", and uses river_id as the FK?

-- hugh
 
Thank you for your reply. i have made some changes. We decided that we don't need the 3rd dropdown (locations) so i removed it and now i'm working with ecosystems table and rivers table only but i have some problems understanding how the cdd works.

Table: "Fishing report" (the main form that is showing in the frontend)
Elements:
"ecosystems" databasejoing to ecosystems table (working and showing ecosystems in frontend)
"rivers" cdd - List: rivers, Id: id, Label: river, watch element: ecosystems, FK: ecosystem_id or river - not working with both options
and some other elements (checkboxes etc)

Table "ecosystems"
elements:
id, ecosystems

Table "rivers"
elements:
id, river, ecosystem_id (dbjoin to ecosystems)

Now i have problem with the only cdd (rivers), its not working and i don't know what i am doing wrong
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top