Skip to main content
added 136 characters in body
Source Link
Eugene Fidelin
  • 3k
  • 3
  • 20
  • 28

Here is the way to solve your issue:

  1. Add Contextual filter of "Global: Null" type

  2. In "When the filter value is NOT available" section check "Provide default value" and specify "Fixed value" and "all". Notice! If view still display results - then try select "Raw value from URL" here.

  3. In "When the filter value IS available or a default is provided" section check "Specify validation criteria" and select "PHP code"

  4. Specify this code

    if (count($view->exposed_input)) { return TRUE; }

  5. In "Action to take if filter value does not validate" select "Display all results for the specified field" value

  6. Don't forget to add any "No results behavior"!

Views filter configuration

Now results will be shown ONLY if filters are sent. View will be empty on first display.

Here is the way to solve your issue:

  1. Add Contextual filter of "Global: Null" type

  2. In "When the filter value is NOT available" section check "Provide default value" and specify "Fixed value" and "all"

  3. In "When the filter value IS available or a default is provided" section check "Specify validation criteria" and select "PHP code"

  4. Specify this code

    if (count($view->exposed_input)) { return TRUE; }

  5. In "Action to take if filter value does not validate" select "Display all results for the specified field" value

Views filter configuration

Now results will be shown ONLY if filters are sent. View will be empty on first display.

Here is the way to solve your issue:

  1. Add Contextual filter of "Global: Null" type

  2. In "When the filter value is NOT available" section check "Provide default value" and specify "Fixed value" and "all". Notice! If view still display results - then try select "Raw value from URL" here.

  3. In "When the filter value IS available or a default is provided" section check "Specify validation criteria" and select "PHP code"

  4. Specify this code

    if (count($view->exposed_input)) { return TRUE; }

  5. In "Action to take if filter value does not validate" select "Display all results for the specified field" value

  6. Don't forget to add any "No results behavior"!

Views filter configuration

Now results will be shown ONLY if filters are sent. View will be empty on first display.

Source Link
Eugene Fidelin
  • 3k
  • 3
  • 20
  • 28

Here is the way to solve your issue:

  1. Add Contextual filter of "Global: Null" type

  2. In "When the filter value is NOT available" section check "Provide default value" and specify "Fixed value" and "all"

  3. In "When the filter value IS available or a default is provided" section check "Specify validation criteria" and select "PHP code"

  4. Specify this code

    if (count($view->exposed_input)) { return TRUE; }

  5. In "Action to take if filter value does not validate" select "Display all results for the specified field" value

Views filter configuration

Now results will be shown ONLY if filters are sent. View will be empty on first display.