Configuring The Contact Form Module In Drupal
I’m currently wrapping up on a Drupal installation for a client I’ve been working with for a while. One of the finishing touches on the new site is a contact form. Thankfully, Drupal has a contact form module built in, so there’s not really much work to do to get it up and running.
Here are some notes on configuring the Contact Form module for Drupal:
Activate The Module!
That’s right, browse to Administer / Site Building / Modules in your site and activate the Contact module. Save the configuration and you’re ready to go.
Configure The Contact Form
Browse to Administer / Site Building / Contact Form to begin. Click the link at the top of the page to Add Category.
- Give the category a name. I’ve used “Contact Site” (where site is the name of the website).
- Configure recipients. You can put in a single email address here, or multiple addresses separated with a comma. I’m using email@example.com.
- If you like, you can configure a polite autoresponder to send an acknowledgement back to the visitor.
- Take note of the weight setting – if you have more than one category in your contact form, you’ll have to set the weight so that the fields are ordered in the right manner.
- Since we have only one category, we’ll ignore the Selected setting for now.
When you’re done configuring, click Submit to create the contact form category.
This basic setup with give you a form with fields for name, email address, subject and message. There’s also a check box that allows the sender to receive a copy of the message.
Configuring Contact Form Settings
You can customize the contact form message text by browsing to Administer / Site Building / Contact Form / Settings. This page also allows you to set maximum messages per hour – an anti-spam setting that prevents you getting bombarded with contact form spam!
You can also allow members to have a personal contact form which relays emails to the address they have in their profile.
Integrating Into Site Navigation
When you activate the Contact Form module, a menu item gets created for the page (which points to yoursite.com/contact. This item is disabled by default, so you have to enable it and move it to the desired place in your navigation.
To do this, browse to Administer / Site Building / Menus. Find the Contact Form link and click the enable button. The edit form should appear.
You can change the title of the contact form if desired, but the important items are the Parent Item field and the Weight. Set these according to your navigation structure and you should notice the link appearing when you refresh the page. You might have to fiddle with the weight of the item to get it in the right position.
Testing The Form
You’re nearly finished. Just don’t forget to test the form by sending a quick message through it!
[tags]Drupal, Tips, Web Design[/tags]