Cakephp filter index pages according to foreign keys

I'm new to CakePHP and am missing a key feature not built as a scaffold: filtering.

What do I need to do to provide dropdown menus or multiple selections on the index pages for each field that is a (foreign) key, thus allowing the table to be filtered ("OR" within a multichoice, "AND" between different multiselections, if any)?

From what my web search showed me, there are many more people trying to accomplish the same thing, although I couldn't find anything that could work for me because they have text fields and wildcard filtering, or the plugins they offer only work on 1.2, whereas now I started with 1.3, etc. etc.

Could someone ease the confusion and perhaps provide some working code or direct me to the final guide [tm] where this issue was resolved?

thanks

+2


a source to share


2 answers


It seems to me that the scaffolding is provided as-is . If you find that the assistant can handle this, many will be interested, I'm sure. But scaffolding doesn't really satisfy such "complex" requirements, they just list the string in the model. While it shouldn't be difficult for you to program what you want: using cake from the console, it can generate for you all the code that scaffold does, you only need to add your filters.



0


a source


I think you want this one . The author of the filter wrote:



Filters hasOne and belong to relationships (I prefer to choose from dropdowns, but each is).

0


a source







All Articles