CB Query Field 3.0 - Configuring the Value based on the value of another field

10 years 9 months ago #231283 by white_nazgul
Hello,
I am currently designing a registration page for my users.
The registration page has these following fields -
1. School State
2. School County
3. School District.
4. School Name

There are 10,000's of data for each field.
For example there will be 26 states, each state will have around 50 county and then 1000 of district and 10000 of school per district.

I need to filter the values based on the value selected before.

So if a person selects California as their state then it should display on the county that are there in California.

I am using CB Query field 3.0

I have the table with all these data.

1st drop down i.e. School State
Name - cb_schoolstate
query -SELECT DISTINCT state FROM `school_data` order by state

2nd drop down i.e. School County
Name - cb_schoolcounty
query - SELECT DISTINCT county_name FROM `school_data` where state='[cb_schoolstate]' order by county_name

but this second drop down is not populating any result.

Could any one help please?

Thanks,
J

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.115 seconds

Facebook Twitter LinkedIn