Create Forms using Contact Form 7 in WordPress

There are several reasons for incorporating contact forms into your site: reduce spam emails by having a form instead of freely adding your email to the site; collect user information; generate leads by tracking site visitors and creating ways to analyze target audiences; allow users to leave a message directly from your site which keeps the user engaged; building out an email list; and keeping track of user inquiries.

The simplest solution to the points above is to use Contact Form 7 in conjunction with Flamingo. Contact Form 7 allows developers to create contact forms with ease, manage multiple forms in one place, and easily implement them into new or existing pages. Flamingo then solves the issue of keeping all the information in one spot to be easily analyzed.

How to Bulk Delete Content in Drupal

This tutorial will show you the various ways of batch deleting content inside Drupal. You may want to delete content if you’re doing the following:

  • You want to work on a clone of a Drupal site but delete some or all of its content.
  • You want to clean up your Drupal database and delete some old content
  • You just want to batch delete content for any other reason.

There are different ways this can be achieved. We will cover the following ways:

Select Taxonomy Terms Using Autocomplete Deluxe Module in Drupal

Autocomplete is often used in taxonomy fields, such as the tags field. It helps users locate previous taxonomy terms by displaying a drop-down selection list according to what they are typing. If multiple entries are allowed, it is often separated by commas.

This module uses the jQuery UI autocomplete, implements a taxonomy widget and provides a result for multiple selections similar to the Chosen module, but without downloading a plugin.

Control Block Visibility using Conditional Blocks in WordPress

Each visitor and customer who visits your site is unique. You will want to make the content dynamic and hide certain blocks for the type of screen the user is accessing your site from.

The simple solution is to use the Conditional Blocks plugin to change the visibility of certain blocks as well as determine the minimum and maximum size of the screens. While there is a premium version, it is not necessary to achieve the basic conditionals of showing blocks based on screen sizes or users logged in.

How to Display Errors in Drupal

Have you seen an error message in a Drupal site like this?

When you are building or modifying a Drupal site, the error above can sometimes appear and catch us in unexpected situations, but there is nothing much you can do. “Try again later” is not going to help. What will you do?

There is not much you can do about it, because there is not enough information to go further. By default, Drupal is configured not to display error messages. To find out what caused the errors, the error message display options require to be turned on first.

In this tutorial, you’ll learn how to turn on error display to help you debug.

WARNING: It’s important not to display error messages on a production site. The error messages could display sensitive information such as paths or server level user accounts.

Conditionally Display Blocks using Block Visibility in WordPress

Each site is unique to its visitor. There are times when an editor will want to hide certain blocks from visibility depending on the user role, the type of user, or the screen size the website is viewed from.

A solution to adding conditions to content blocks is to install the Block Visibility plugin, which gives visibility control to many types of blocks and additional features to schedule content visibility.

Conditionally Display View Fields using Views Conditional in Drupal

The View Conditional module is helpful if you want to display custom text depending on other field values in the View. It can be used to conditionally hide field values based on other View fields.

The module allows you to add a custom “conditional field” to the View, just like any other View field. Then you can use this field to customize the output based on the values of other fields. If this sounds confusing, it will become much clearer as we walk through a real example in this tutorial.

A common use case is if you have a View table and you want to change the content of a column depending on the value of another View field. We will demonstrate this now.

Open Webforms using Dialog Box in Drupal

Webform comes with an option of displaying a form in a pop-up Dialog box, but is not enabled by default. With this option, a webform can pop-up on the screen when clicking on a link. Users can stay on the same page while filling in the form.

In this tutorial, you’ll learn how to enable and configure dialog box pop-ups in Webform.

How to Manage Images and Files in WordPress

WordPress has one centralized location to manage all the media on your site – Media Library. This is where you can add, change, and view any media including documents, images, and videos to be used throughout your site. It allows you to organize and filter your uploads, edit images, attach media assets to certain pages and posts, as well add additional information such as alternative text and captions to assets.

In this tutorial, you’ll learn how to manage media assets in WordPress.

How to Print Variables using Devel and Kint in Drupal

As a Drupal developer, you will often want to inspect variables in your modules or themes to view the actual values. PHP has default functions such as var_dump() and print_r() that will print all the information but it’s not very intuitive nor printed in an easy to understand way. In most cases, it prints too much information and it can be time-consuming to find the variable you actually want by filtering through all the arrays and methods.

Using Devel and the Devel Kint Extras modules, you can print variables in a more user-friendly way.

This tutorial will walk through how to set up these modules so you can print variables in PHP and Twig using Kint.