Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Zdeněk Tůma Posted January 12, 2021 Posted January 12, 2021 (edited) Hi, i have this custom database with custom fields -> https://www.funplay.pro/csgobanlist/ But I no have idea how to create searching per custom fields. Is it even possible? Edited January 12, 2021 by Zdeněk Tůma
Morrigan Posted January 12, 2021 Posted January 12, 2021 Add the ability to "Filter by this field" at the field level: This only works for specific types of fields like select and checkbox fields. Jimi Wikman 1
Jimi Wikman Posted January 12, 2021 Posted January 12, 2021 It is kinda possible 🙂 Any field you have in your database can be used as a filter. If you activate that, then in your query when you make the filtering you can see the full query that you need to use. In my database over hosting services for example I have a filter for OS and if I select Debian as the filter option, then my query look like this: https://jimiwikman.se/operations/hosting/shared-hosting/?advanced_search_submitted=1&&content_field_238[fedora]=fedora&content_field_191[1]=none&sortby=record_rating&sortdirection=desc&record_type=all&time_frame=show_all If you are a bit creative, then you can build this up to form the submit url for a search query. In theory anyway as I have not tried it yet 🙂
Zdeněk Tůma Posted January 13, 2021 Author Posted January 13, 2021 (edited) 21 hours ago, Morrigan said: Add the ability to "Filter by this field" at the field level: This only works for specific types of fields like select and checkbox fields. i cant find this setting maybe that's what I'm looking for Edited January 13, 2021 by Zdeněk Tůma
Morrigan Posted January 13, 2021 Posted January 13, 2021 Possibly, as I said in my previous post that only specific types of fields are filterable.
All Astronauts Posted January 13, 2021 Posted January 13, 2021 If you want to FILTER the records when viewing them with table view, toggling that on will add it to the "sort by" drop down on the table. This thing: If you want to SEARCH on the field, you need to get those fields into the search engine, and for that you'll need my plugin.
bfarber Posted January 13, 2021 Posted January 13, 2021 Not exactly accurate. The "Allow filtering" option does not control the sort menu, but rather which fields are filterable. That said, the filter form does not display by default on the page. What you need to do is open the sidebar widget manager and add a "Database Filters" widget to the list of records page to add the filter options. This will give you the following (taken from our bug tracker here)
All Astronauts Posted January 13, 2021 Posted January 13, 2021 He's right you know, I totally forgot that widget even existed
Zdeněk Tůma Posted January 13, 2021 Author Posted January 13, 2021 1 hour ago, bfarber said: Není to úplně přesné. „Povolit filtrování“ možnost se nebude ovládat nabídku třídění, ale pole, která jsou filtrovat. Formulář filtru se tedy ve výchozím nastavení na stránce nezobrazuje. Co musíte udělat, je otevřít správce widgetů na postranním panelu a přidat widget „Filtry databáze“ na stránku seznamu záznamů a přidat možnosti filtrování. Získáte následující (převzato z našeho trackeru chyb zde) when you add this widget, nothing is displayed
bfarber Posted January 14, 2021 Posted January 14, 2021 Are you adding the widget to a listing page (i.e. a page that lists records)? Do you have any fields configured to allow filtering?
Zdeněk Tůma Posted January 19, 2021 Author Posted January 19, 2021 On 1/14/2021 at 4:41 PM, bfarber said: Do you have any fields configured to allow filtering? I can't find this setting anywhere in the field settings
Morrigan Posted January 19, 2021 Posted January 19, 2021 @Zdeněk Tůma This only works for specific types of fields and it is a setting on the main "Field" setting screen at the bottom. If you don't see the "allow filtering" toggle that type of field is not filterable.
Recommended Posts