Page content

Drupal 8: Extending Core Configuration, Extending Core Forms, and Overriding Core Routes


When working with Drupal 8, sometimes we will want to do things like extending the configuration of core or another module, extending a form provided by core or another module, and/or overriding forms on a route. At Jaypan, we recently came across a situation like this, where we needed to add a new field to the site for site description, to be used in structured data (aka RDF) for the site we were building. This needed to be a global field, so the most natural place to set the value for the field was on the basic site settings page, located at /admin/config/system/site-information.

In this tutorial, we will explain the method we used to achieve this functionality, going over the given steps, with an explanation of what is happening along the way.

Embedded audio player with externally hosted files on Drupal 8


Hosting audio files on a Drupal site can turn into a costly process, between the costs to host the files, as well as the bandwidth costs if the files are listened to regularly. In order to keep costs down, hosting the files on an external service, such as Dropbox, is a preferable alternative. However, as the files are not hosted on the same server as Drupal, it takes a little additional work to get this working, that at the time of writing cannot be done purely with modules.

High Performance JavaScript using Drupal 7's JavaScript API


In today's web, JavaScript is an essential component of any nice, easy to use website. However, while the basics of JavaScript can be easy to learn, it can be hard to know whether the scripts you are writing are heavy, causing page lag, and making for longer load times.

Drupal comes with an excellent JavaScript API, allowing for the creation of high-performance applications, but it can be confusing to know exactly how to effectively use the API.

Advanced AJAX enabled multi-step forms: creating and altering Drupal entities in custom forms (aka: Wizard forms)


Sometimes we need to create custom Drupal forms to create or update Drupal Entities, in a different manner than the default forms that we are provided with. In this tutorial, we will look at creating a form 'wizard', that allows a user to create or edit two nodes in a single form.

Example overview

Throughout the world, many companies have multiple branches of their company. The form we will create in this tutorial will create a company, and then a branch that is assigned to that company. This will be done using a multistep form with the following steps:

Drupal 7 - change keyboard types for mobile devices


With HTML5 comes new <input/> types, which allow for different keyboards on mobile, improving the mobile user experience. However, Drupal by default does not allow for the changing of <input/> types to these new HTML5 types. This tutorial will show how to set up your system to allow for custom input types to be set on any text element.

This tutorial will cover two main steps:

Creating a multiple Node (Entity) edit form in Drupal 7, with filters, a pager, and sortable columns

This tutorial describes how to create a form containing a list of Nodes in an HTML table, with a pager and sortable columns, allowing for multiple nodes to be edited on a single page. The form also contains a search area, allowing for the filtering of the nodes shown by user submitted values.

Preventing emails from being sent from a Drupal 7 development environment


Once a site has gone live, it's important to not send emails (and do other things like pushing to Twitter/Facebook) from development environments. These actions should only happen from the production server. This tutorial describes how to set up your code to ensure that you are only sending emails etc. from the production environment.