5 users online. Create an account or sign in to join them.Users
Customise Select Box Link filtering
This is an open discussion with 3 replies, filed under Extensions.
Search
Sounds like it'd actually be pretty easy to add. The SBL can be filtered either by an ID or by the handle/value of the linked field (assuming it's a text input field). So where this WHERE condition occurs (querying the value column) you need to add another condition to check whether the filter starts with contains:, and use a LIKE %...% match in the SQL.
I'll gladly take a look.
I think I may have realised what I missed in my first attempt, so when I've got that bit in, I may ask you to take a little looksie.
Cheers Nick.
I think I've done it. Completely forgot to put the where and joins in my part of the code.
It's in the filtering branch of my fork if anyone wants to test it and play. I very much doubt that this will make it's way into the released version, as, like I said earlier, different work is being done to better the field filtering in general.
Thanks for your offer of help Nick.
Create an account or sign in to comment.
I spoke to Brendan recently about the filtering logic for fields, specifically the Select Box Link, and whether it could be expanded to use filtering like the Reflection Field does.
It seemed to be a no go from Brendan's perspective, as he and Rowan are working on something wonderful for us all soon with regards to filtering.
Problem is, I desperately need the
contains:filtering method in the Select Box Link. I thought I had something, but due to my lack of core knowledge, I can't actually get it to work.Would someone have the time to look over my code and/or maybe help me to do this? I have some progress, like I say, but it doesn't actually filter anything.