Dependent drop down filter

QuestionsDependent drop down filter
Gary Brett asked 4 years ago

Hi there, I have created mysql query to output a pivot style table that works great with the grids. Is it possible at all to have a select filter above the grid that would allow me to choose which query/grid to load?

At present I use 3 tabs, 2015, 2016 & 2017 for the years but would be much easier and less work to use a select for this feature.

I have pasted code over here, I have 3 of these in each page, one for each year filtered in the WHERE clause, if 1 select filter could target and load each query would be great.

http://pastebin.com/fHwSgdD5

1 Answers
Abu Ghufran answered 4 years ago

Hello,

You can have a select dropdown with these options and submit form (using $_GET) with dropdown onchange event.
In you page you can put this GET values in select_command in where filter.

Your Answer

13 + 3 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?