I have a rather complicated View (created with the Views module) with about a dozen filters on it, all exposed to the user. The View is very heavy on CPU, and I would like to prevent it from running until the user has applied his filter choices.

One suggestion for dealing with this is to make a filter "Required": then the exposed filter will be empty when the View is first run and as a result will force the user to apply filter values explicitly.

The problem is that the filters are almost all dropdown lists, so they get a value applied automatically and don't therefore stop the View from running. Does anyone know some other way to do this?

| improve this question | | | | |
  • There is solution on that page: drupal.org/node/358546 Does it solves your problem? – herci Jul 6 '15 at 16:20
  • Trouble is this involves using PHP code and appears to be for Drupal 5 and/or 6. I could try it on D7 but I am hesitant to use code which could prove unstable later – Martin K Jul 7 '15 at 18:44

I'm assuming that for suggesting an answer to your "Does anyone know some other way to do this?", it's OK to also suggest another "module" (instead of just another "way") ...

The Forena module might possibly be a valid alternative for you to consider. For more info about this module, refer to either of these links:

In this specific case, you could consider transforming your "complicated View" into appropriate Forena data blocks (SQL queries) and custom reports (and/or charts ...). And for those reports to be generated (and the SQL queries to be executed), you could consider using the various Forena features related to "Report Parameters". A few more details about these Report Parameters:

| improve this answer | | | | |
  • Many thanks - I had looked at Forena a while back but then it slipped off the radar screen. Looks like I need to come back to it! – Martin K Jul 7 '15 at 18:42
  • Thank you for the thank you. Hope this time your "radar" is big enough ... Also, looking at your profile it shows that you never visited the "tour" (within the help pages, upper right). Which is also why you're probably not aware of what's written in drupal.stackexchange.com/help/someone-answers ... – Pierre.Vriens Jul 7 '15 at 19:14
  • @MartinK : bonjour! Did you ever look at Forena "again"? – Pierre.Vriens Aug 4 '16 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.