Almost every website provides a mechanism for users to contact the individual, business, or association that owns the site, whether that be in the form of a simple e-mail link or something more advanced using a web form. Often, a contact page is part of the main menu hierarchy, as is evident in our mockup.
In this chapter, we will take a look at creating a contact page that uses the new contact forms that are part of Drupal 8 core. We will not be using any contributed modules, as core provides us with the configuration and templates needed to create most forms. We will also not be covering the extensive Form API, as it is beyond the scope of this book.
However, we will be learning the following theming techniques that will allow us to create a well-structured contact page:
We will begin with reviewing the mockup of our contact page and identify how specific blocks or fields will need to be presented for display.
Next, we will take a closer look at contact...