Announcement

Collapse
No announcement yet.

Disable/Enable Refined Search Filters

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Disable/Enable Refined Search Filters

    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.

    disabled filters.png

    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

  • #2
    Just a thought. Maybe you can have 2 grids.

    One for the registered users with a gully functional Refined search filters, and the other for non-registered users. The ones for the non-registered users shows the filter area but a dummy only. Meaning, they are pure greyed out html / text only. no links, no functions.

    Comment


    • #3
      Thanks vcgonzales.

      ​Yes, that might work as a temporary fix, but it has a couple of drawbacks. First, it means that the bottom items on the refined search will always be *invisible* when you are logged out, not visible and greyed out. The idea is that by having them visible, they are a marketing tool to get people to register on the website.


      Also it means we have to maintain two copies of the same grid, which can lead to duplication of effort and possibly to inconsistency between the two.

      ​I realise this is not an urgent requirement - just wondered if anyone else might find it useful to have some more flexibility on the refined search (which we certainly use a lot). It might also be good to allow for some custom html at top and bottom of the refined search options?

      ​Best regards, Jeff

      Comment

      Working...
      X