Add a custom contact form
There are a few ways to create forms with Drupal, we are going to look at one of the more simple methods.
- Watch: Why use Webfrom?
A. Creating the webform node
- Install & enable the webform module
- Go to create content -> webform
- Create a new webform give it the title ‘Contact me’
Add some introductory text to the body e.g.
“Please feel free to contact me with the form below”
In the menu settings click the checkbox Provide a menu link and give the menu title as Contact Me and make the parent item Main Menu
- Clicking save will take you through to building the webform itself
B. Creating the contact form
- Here you could build whatever fields you needed for your form, drop down lists, checkboxes etc. for now we’ll keep it simple and just add a text field for name, an email field so we know who to reply to and a text area box for the message.
- The default settings are OK for all of these fields for now - we can come back to them at a later lesson.

- Now click the E-mails tab in the top right - this is where we will set up triggered emails when the form is submitted.
- First we’ll trigger an email to you to let you know that someone is trying to contact you - add your email address as in the image below and click Add:

- You can leave the next screen with its default values and click Save E-mail Settings
- Now we’ll trigger an email to go to the person who submits the form - this time add an email of the component value email:

- Change the email subject to something appropriate like Thanks for contacting me
- Change the email reply address to something like no-reply@yourdomain.com
- Change the email from name to your name
Change the message in the E-mail template to something appropriate like:
“Hi there thanks for contacting me, I’ll get back to you as soon as I can”
you’re all done - click Save E-mail Settings
The last part to configure are the form settings
- Add an appropriate confirmation message
- limit the submissions to 10 per hour and 2 per user - this is precautions to slow down spam - we’ll put in some better spam protection at a later date

Now test your contact form :D
Resources
- Watch: Configuring Webform nodes
- Watch: Drupal.org, Webform video tutorials
- Watch: Webform tutorial
- Read: Webform documentation