Dropdown Filter

esskay

Member
Hi
1. I want to know how can I create a list with dropdown filters of my choice. Elements - Details - Plugin - Dropdown with sub options does not show in the list.
2. In the list view settings Filter tab if I choose filter type dropdown then it shows all dropdown options of the database. I only want dropdown label value of my own and not all of the list.
Can someone show me a way to do this....?
 
Not sure what you mean.
You can create a dropdown element with values/labels as suboption or you can create a list with your labels and create a databasejoin element pointing to this list.
If you want to filter independent of the list elements you can create a search form.

gesendet mit Tapatalk
 
This does not work for me....
To recreate the issue please follow these steps -
1. Login to backend my site
2. Elements and sort according to any form
3. List view settings
4. Filters
5. Filter Type
In filter type when I choose dropdown It gives a complete list of all the several hundreds item of the list to choose from. For a visitor it is difficult to search from several dropdowns. I want to customise the dropdown items so that the visitor is asked to choose from predefined values instead of full list.
At the moment the filter is set to Field. To test it, you can set it to dropdown and see what is happening. Please change the value back to Field once you are through.
 
I don't need to test, this is how filters are working.
You can set the filter to Filter Data = recorded data (which will show only the data recorded in the list)
You can set the filter to autocomplete instead of dropdown

I want to customise the dropdown items so that the visitor is asked to choose from predefined values instead of full list.
If you want to filter independent of the list elements you can create a search form.
 
If you want to filter independent of the list elements you can create a search form.
I fact I tried to do this watching your video tutorial. I created a search form with databasejoin element and the form was working fine. However, I could not figure out to add custom value for the dropdown filters.
Can you point me to some tutorials/guide/documentation/forum thread etc. which explains in details how to achieve this...?
 
If your search form is using a join element to build the values for your filter selection, you would probably need to use the optional "Join's Where and/or Order By" statement, to restrict the values to those you want.

However ...

As this is something I've been thinking about doing for a while, I've add a new option to the join element, called "Filter Where" (under the "Data - Where") tab, which allows you to specify any valid where clause to the query that builds the element's filter values. Currently it'll only get applied if you are using the "Show All" option for filter display, i.e. if you are showing all rows from the joined table in your filter, rather than "Recorded Data".

So, for instance, you could add a hidden field to your joined table called "show_in_filter", and set it to '1' for those rows you want displayed in your dropdown filter, and add this as the "Filter Where" ...

Code:
{thistable}.show_in_filter = '1'

Note that {thistable} is a standard placeholder, which will be automatically replaced with the table alias currently being used to reference your joined table, so use that exactly as-is.

This feature is "work in progress", so be careful with it. You'll need to do a full github update to pick up the new option.

-- hugh
 
Hi
Thanks for the update....Can I know the ETA for the stable version with this feature...? I would rather wait instead of experimenting myself....This feature will definitely be a value addition for Fabrik....

Thanks
 
It's in github now, which means it'll be in the next build we do, which will be within the next few days, as we need to get the fixes for J! 3.4 out.

I'd appreciate it if you could test this feature before we roll out the release.

-- hugh
 
Thanks, I'd appreciate it. If you could get back to me over the weekend, that'd be great, as we want to do the build as early as possible next week. I did pretty much implement that feature just for you (although it is something I've thought might be useful for a while), so nobody else is liable to be using / testing it, and I don't really have time to thoroughly test.

Thanks!

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top