Create a 'Contact Us' Form using built-in Drupal 5 Contact Module

Roland Tanglao - March 23, 2007 - 21:25

Note that this uses the built in contact module which is great but not very flexible because the fields are hard coded and therefore you can't put in your own custom fields.

Step 1: Ensure that the contact form is enabled

  1. Login
  2. Click Administer » Site building » Modules
  3. Enable the contact module by checking "Contact" and clicking 'Save configuration'.

Step 2: Create the Contact Us form and preamble text

  1. Click Administer » Site building » Contact form » Add category
  2. Enter "Contact Us" under "Category"
  3. Under "Recipients:", enter your email address.
  4. Under "Auto-reply:" enter some nice auto-reply text like "Thanks for contacting us. We'll get back to you as soon as we can."
  5. Select "Yes" under "Selected:"
  6. Click "Submit"
  7. Click the "Settings" tab
  8. If you are happy with the default preamble text of "You can leave a message using the contact form below.", then no action required. Otherwise enter your own text and click "Save configuration"

Step 3: Add it to your site

Newer sites will have a link to the contact form already in their 'secondary links' (that is, the links at the top of the website that appear everywhere on the site), but if you want to add it yourself, you can do this through the menu administration section.

  1. Click Administer » Site building » Menus
  2. Below "Secondary links" (or 'Primary links' if you like), click the 'Add item' link.
  3. Enter a title and description. The title will be the link's text, and the description will be the text that hovers over when you move your mouse cursor over the link.
  4. For the Path, type in 'contact' (without quotes).
  5. Keep "Expanded" unchecked, and select a Weight (where in the links it will show up).
  6. Click "Submit".

Step 4: Test your Contact Us Form

  1. Surf to the /contact e.g. yourdomain.com/contact
  2. Fill in the form
  3. Click on "Send e-mail" and follow the procedure in Step 5 and verify that your information was collected successfully.

Step 5: Collect the results as they come in

  1. You will receive the email in the account you filled in Step 2

Step 6: You are done, take a break!

Do a little dance, get down tonight, have a coffee, eat some mohnkuchen, do whatever works for you!

Creative Commons License

This work is licensed under a Creative Commons Attribution-Share Alike 2.5 License. This license applies to all text written by Bryght. All others retain full copyright to their text.