We have been asked about duplicating in Scriptcase some functionality from an existing website. It’s very much like an SC Refined Search, but some of the filters are disabled if the user is not logged in (registered) on the website. A screenshot is attached - the filter at the top function, the ones I’ve highlighted in yellow are greyed out and do not function unless you log in.
[ATTACH=CONFIG]n74168[/ATTACH]
I was thinking that this could be done very nicely and flexibly in SC if there was an option on the Refined Search fields, for us to specify the name of a PHP function, the result of which will be True/False. If the function returns True, the filter is enabled. If not, then that particular field filter is greyed out. For instance, to duplicate the functionality in the screenshot, I could create a PHP function called IsUserLoggedIn() and then just put that function name in the refined search field setup for the field Job Title. It would be great if inactive filters could be either hidden or greyed out as an option too.
Would anyone else find this useful? Or can someone see a way to do it simply using the existing SC facilities?
Thanks and regards
Jeff