This topic is locked

Three dropdown dependet

10/1/2013 4:44:57 PM
PHPRunner General questions
M
MarioD author

Please help

I have a table that has elements NNaziv, brojSemestra and NazivSmjer. I have to do data entry into a new table based on three dropdown dependet filters in the previous table. User through the form of a drop-down menu, choose Nazivsmjer and next brojSemestra. Drop-down menu NNaziv must occur only those who meet both criteria and the user selects only one. The new table will be overwritten values ​​NazivSmjer, brojSemestra and NNaziv.
thanks for your help

Sergey Kornilov admin 10/2/2013

Could you elaborate what the question is? Do you need to hide/show dropdown box based on some condition?
If yes, check this article for inspiration:

http://xlinesoft.com/phprunner/docs/show_dropdown_list_of_us_states.htm

M
MarioD author 10/8/2013

I apologize for not describing my problem correctly.

I'm trying to develop an application that will be used by the professors who will record their classes after these are completed.

I have created two tables. In the table Program, there are 100 classes. They are recorded by their name, but also by the element of the different programs in which these classes are performed, and also by the semester during which they are thought (1 to 10). When professor logs in he should be able to choose a program. Based on the selected program and the chosen semester, he should be able to see and choose in the third dropdown menu only the classes performed in previously selected semester and program. After the class is selected, the professor has to record the number of performed classes, the classroom etc., and all these elements are entered into the table Classes.

My question is: how to create the filter of the Program- >Semester=Chosen classes.
Thank you in advance.

Sergey Kornilov admin 10/8/2013

Unfortunately you cannot make third dropdown box to be dependent on first two. Third dropdown needs to be dependent on second one.
Here is the sample data structure that explains how it should work
Table 1: Categories

CategoryID CategoryName

-----------------------

1 Cat1

2 Cat2

3 Cat3
Table 2: SubCategories

SubCatID CategoryID SubCatName

-------------------------------

1 1 SubCat1

2 2 SubCat2

3 1 SubCat3

4 3 SubCat4
Table 3: Items

ItemID SubCatID ItemName

--------------------------------

1 1 Item1

2 2 Item2

3 2 Item3

4 4 Item4
The link between second and third dropdown is a single SubCatID field, which is also a primary key in SubCategories table.