How contact forms work, what the configuration options means and how to use "weight"

Description

Collection: Drupal 8 Site BuildingChapter: How to create custom forms and manage menus

Here we look at how contact forms in Drupal 8 are fieldable just like any other entity in Drupal, but unlike other entities it's the form and not the output that is presented to the end user. We begin to modify the default contact form to suit the requirements of our wireframe and work through the configuration options available for contact forms in general.

Transcript

So Drupal comes with a form builder, let's open it up. I'm going to go to Structure, Contact forms. The Contact forms work very similarly to content types, except instead of the value of the fields being displayed publicly, the fields themselves are.

We get to use all of the same fields and when a user submits the form, an email gets sent to whoever you've specified. By default, Drupal comes with this Website feedback form. Let's open this up in a new tab.

So this actually looks pretty similar to what we want. It's got website feedback, your name, your email address, subject, message, send yourself a copy, and then Send message and Preview. Now if we look at this in an anonymous browser, I'm jumping to our incognito window here, you can see that the Your name and Your email address aren't pre-filled like they are when we're logged in.

So let's modify this form to make it match our wireframe. Let's go to Edit to see what the configuration options are here. So we can set the title here, in our case we want the title to be Contact MagnifAscent, so let's change that.

For the recipients we have whatever email address you entered in as the ...

When you have an active membership, you will be able to see your progress here.

Skill focus: Site BuildingSkill level: Beginner - Intermediate

If you're looking to get started with Drupal 8, this is a great place to begin. In this series we build a practical Drupal 8 site from start to finish and get immersed in the most essential techniques, terminology and tools needed for both professional and hobbyist site builders. No matter how you work with Drupal 8 - as a site builder, programmer, front end developer or project manager - what you learn here will provide a solid foundation.

We cover a lot of material in this series, including these key points:

How to structure content and work with comments

How to evaluate, install and configure modules

How to use views to display lists of content

How to create relationships between content and use them in content lists

How to improve performance and security

How to work with blocks and structure custom block types

How to work with taxonomy, paths, and much, much more

Who this collection is for

This video collection is intended for those who are completely new to Drupal, or for those that want to make sure that they have a solid foundation before moving on to more advanced projects. We assume you know nothing about Drupal, and lead you from start to finish through a practical project.

It looks like there might be an issue playing videos in this browser. We're working on better cross-brower experience, but in the meantime please try the latest Chrome or Firefox browsers. Or, you may be able to watch the video directly without progress tracking or transcript: