Filter module for lists with OR option

cyberholic

Member
Good day everyone,
i have a list and form with the title "products". I created a second form so that i create a Module
out of it to use it as Search module (just like in a shop where you can filter or pre-search for products).
Everything is working fine - on whatever page i am, when i use the Module, the page with the whole
List comes up depending on the options i set via the module.

The options to search for are:
Title, type of fruit, origin, word in discription

My Problem:
Type and Origin are DropDown elements. So it does not matter what i enter in Title or discription,
the result page ALWAYS sets the TYPE OF FRUIT element and ORIGIN to the first value.

In SQL theory the result is like
SELECT * FROM groceries WHERE title ="" AND type_of_fruit ="Apple" AND origin = "From Belgium" AND
discription = ""

What i want is to change is that there is no pre-defined value from the dropdown. In the example: Apple and From Belgium should be empty too.

I hope you understand what i mean and thanks for your time!
Carlos
 
It looks like dropdown labels cannot be empty.
But you can add 'Please Select' as the label for the 1st option in those dropdown elements - would that solve your problem?
 
Bauer's tip is ok if you want to have an "empty" value.

But this won't help if you want to filter with OR (..AND something = "" won't return all records but only those where something is really empty).
How do you submit your search form? With a redirect plugin (which settings)?
 
Hi Troester,
jetzt it is a redirect to a menu point where the data is send as SEARCH DATA. Just like i read it somewhere on the forums and tutorial on
how to create such a module. It works fine apart of the "empty" values for an OR statement.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top