Webform 8.x-5.x: How to create a custom Views exposed filter form [VIDEO]

 How to create a custom Views exposed filter form

Problem

The Views module allows filters to be exposed as a form above the displayed results or even as a block. The problem is that the Views module only supports one exposed filter form per view display and the exposed filter form displays all the available exposed filters.

Using the default Drupal search block to get the results in Views

I am using Search API in Views with many exposed filters. My client wants a search block in the site's header that shows the results in Views. I only need one filter on the header, not all the others, so I can't use Exposed form in block. Also, when seeing the results, I need all the exposed filters to be shown in top of the results, not in the header. I didn't find a solution in internet, so I write my solution code here. If you know a better solution, please, add it in the comments.

I have created a simple module to solve the problem.

Steps:

Webform 8.x-5.x: How to enable the Webform test modules

The Webform 8.x-5.x modules ships with several test modules that contain dozens of example forms that are used for automated testing and can also be used for debugging issues.

To enable the test modules, you can add$settings['extension_discovery_scan_tests'] = TRUE; to your settings.php file or you can enable the the default local.settings.php file that comes with Drupal 8.

Below is a screenshot of the available test forms.

Translator: Acclaro

The Acclaro translator module (tmgmt_acclaro) is a plugin for the Translation Management Tool (TMGMT) and provides support to send and receive translation jobs to the Acclaro.com service.

Testing of Translation Management Acclaro translator can be easily done using SimplyTest.me Drupal 8 version.

Pages

Subscribe with RSS Subscribe to RSS - Designers/themers