Form

Redirect User after login - Drupal 8

When building sites, many client wants users to get redirected to particular page (like Site Home Page) or page based on User Roles. Today we'll see how we can redirect user after login to particular page.

NOTE: I've defined my own custom page using [MODULENAME].routing.yml named as "custom.redirect_callback", which we'll be using for redirecting user.

Tweak exposed form in Views in Drupal

Views module provides the ability to site admin to allow users to select the filters and dynamically refine the results based on selection made. This can be achieved using exposed filters in views. By default the exposed form looks like normal form i.e. fields to select filter, Apply button to get refined results, etc.

Using views UI, we can tweak exposed form and do following things, without writing a single line of code:

Drupal - Change label of exposed filter form button in views

Views one of the great module available in Drupal. Views can be used to show various types of dynamic data and can also be used to allow users to filter results based on his criteria. To allow users to filter results based on his criteria we normally use views "exposed filter" option in every filter we add in view (screenshot 1.0).