Create a contact form
The Drupal CMS Forms add-on includes a ready-made contact form so site visitors can get in touch with you. This page shows where to find it, how to change its recipients, fields, and confirmation message, and how to review submissions.
A working contact form at /contact that sends submissions to the right email address, with the fields and confirmation message your site needs.
Prerequisites
Section titled “Prerequisites”- A running Drupal CMS site with an administrator account.
- The Forms recommended add-on installed. Your site template may include it by default; if not, install it from Extend → Recommended
/admin/modules/browse/recommended.
Find the contact form
Section titled “Find the contact form”The contact form lives at /contact, reachable through the Contact link added to the site’s main navigation. It has fields for name, email, and message.
In the administrative interface, the form and its settings are at Structure → Webforms/admin/structure/webform. The page lists the site’s webforms in a table with their title, description, status, author, and number of results.
Change where the form sends email
Section titled “Change where the form sends email”By default, submissions are emailed to the site’s contact email, configured at Configuration → System → Basic site settings/admin/config/system/site-information. To change this:
- Go to Structure → Webforms
/admin/structure/webform. - Locate the Contact form and choose Settings from the Operations menu.
- On the Emails/Handlers tab, select Edit next to the default email handler. Or choose Add email to send to multiple different addresses.
- Update the To address with the email you want messages sent to.
- Select Save.
Customize the form fields
Section titled “Customize the form fields”Add new fields or remove fields you don’t need:
- Go to Structure → Webforms
/admin/structure/webform. - Choose Build from the Operations menu next to the Contact form.
- Select Add element to add a new field.
- To edit or remove a field, select its Edit or Delete link.
Change the confirmation message
Section titled “Change the confirmation message”- Go to Structure → Webforms
/admin/structure/webform. - Locate the Contact form and choose Settings from the Operations menu.
- On the Confirmation tab, edit the message users see after submitting the form.
- Select Save.
Review the spam protection
Section titled “Review the spam protection”The contact form includes basic spam protection using CAPTCHA and Honeypot:
- CAPTCHA uses Friendly Captcha, an automatic check that runs in the visitor’s browser with no puzzle to solve. Signed-in users skip both CAPTCHA and Honeypot.
- Honeypot adds a hidden field bots accidentally fill out.
Manage the CAPTCHA settings for the form by editing its captcha element in the form builder.
View submissions
Section titled “View submissions”By default, submissions are stored on the site for review:
- Go to Structure → Webforms
/admin/structure/webform. - Choose Results from the Operations menu for the Contact form.
- View, download, or delete form submissions from the list.
Verify
Section titled “Verify”Sign out, or open a private browser window, then visit /contact and submit a test message. The Friendly Captcha widget completes on its own before you submit. It appears under the form’s Results, and the email arrives at the address you configured in the To field.
Variations
Section titled “Variations”- Build a new form from scratch: the contact form is powered by the Webform module, which also builds surveys, registration forms, newsletter signups, and feedback or support request forms. It includes conditional logic to show or hide fields, email handlers, confirmation pages, and integrations with external services. Go to Structure → Webforms
/admin/structure/webformand try creating a new form.
Related
Section titled “Related”- Set up email sending makes sure the emails this form sends actually deliver.
- Webform project page and Webform documentation and video tutorials on Drupal.org.
Was this page helpful?
Drupal is a registered trademark of Dries Buytaert.