How to create a contact page in Drupal 8. 9. 10

Drupal 8 has a core module called Contact. Using this core module we can create a site-wide contact form very easily and quickly. Site administrator will receive message sent via this contact form via e-mail.

Requirements

None. We will use core module and features.

Step 1: Enable Contact Module

Contact module is enabled by default. But you should verify same from modules page.

Navigate to:
Home Administration Extend

example.com/admin/modules

image

Step 2:

Navigate to:
Home Administration Structure Contact forms

example.com/admin/structure/contact

On this page, you can create a new contact form. But in this tutorial, we are going to use default site-wide contact form.

Click Edit button of Website feedback form.

image

Step 3:

Edit this form like,

Change Label to Contact Us

Enter recipients email ID. This email ID will receice messages sent by this contact form.

image

Step 4:

You can add new fileds to this contact form and also manage how this form is displayed on your website.

image

Step 5

Let's add this contact page in our main menu. If you do not want to have a menu link in main menu, you can skip this step.

Navigate to:
Home Administration Structure Menus

example.com/admin/structure/menu

image

And add contact page link.

image

Done!!
You have successfully created and configured contact page for your website. Visite your website contact page to see how it looks. Also, send some test messages to check messages sent are delivered to your email or not.
example.com/contact