This topic is locked

Depending Table.

10/17/2011 12:23:05 AM
PHPRunner General questions
K
kiki_lala author

Hi,

can i have 4 dropdown list in condition 2 tables need to depend each other?
For example, i have 4 dropdown list : gender, sports, sports event and sports position. User must choose the gender first and only the dropdown list sports for men or women will be displayed based on the gender. Next, I also want the related sports event only will be listed in dropdown after the sports had choose. The sports position only for the team sport such as rugby or netball.
Thanks
Kiki

C
cgphp 10/17/2011

You can have two dependent dropdowns at most. As workaround, you can implement a jquery solution like this: http://stackoverflow.com/questions/5910281/jquery-dependent-drop-down-boxes-populate-how

K
kiki_lala author 10/27/2011

the problem is i have 300+ sport event.

so, i cant use the solution that u have suggest.

do you have another suggestion to solve my problem?

Sergey Kornilov admin 10/27/2011

In fact you can have unlimited number of chained dependent dropdown boxes. Check 'Creating multiple chained dropdown boxes' tutorial at http://xlinesoft.com/phprunner/php-database.htm

K
kiki_lala author 10/30/2011

The problem is in dependent list only the field in the main table exist. The field that contain the dependent field doesn't exist in dependent list.
The relationship between the table is like below:
main_table > athletesports_table > sport_table,event_table,position_table
in the main page which contain main_table, there is a tab for athletesports_table which contain information about athlete's sport. and in athletesports tab, the 3 table is related and i want the 3 table depend each other. why in the dependent list cannot display information from 3 last tables as above?

Sergey Kornilov admin 10/31/2011

I recommend to post what you have already to Demo Account and contact support directly so we can see what you have built already and what's missing. It's not easy to decipher based on your description.