Community Documentation

Adding a contact form

Last updated May 1, 2010. Created by NancyDru on March 2, 2007.
Edited by figaro, LeeHunter, dgorton, bryan kennedy. Log in to edit this page.

While a contact form is a simple concept, it can be a bit complex to get set up and operating. Read this whole page before doing it the first time. Don't give up; it really does work.

Setup

The easiest way to add a contact form to a basic Drupal site is to enable the contact module. Go to Administer > Site building > Modules and locate it in the list of core modules. Enable the check box and go to the bottom to save the change.

Click Administer > Site building > Contact form. Here you can set up the "Categories" - or recipient name/office.

For example, email for the Sales Department might be given a category of "Sales." The email address that the form is sent to may be sales@mycompany.com. If you want a reply automatically sent to the person sending the contact email, you can specify that here. Don't worry if you don't know them all right away, you can come back and change this at any time. Click the "Submit button."

Now click on the "Settings" tab. Here you can limit how many contact emails an individual may send in an hour -- this helps limit spamming. You may also turn on personal contact forms here; this allows users to contact each other. Click on the "Save configuration" button.

Grant access permissions

In order to allow people to use this contact form, you will need to give them permissions to do so.

Click Administer > User management > Access control (in D6 Administer > User management > Permissions), locate the "Contact module" entry and enable it for the roles that will use Contact. Save your changes. The menu link (next step) will not be visible to anyone not having access.

Add "Contact" to the menu

Go to Administer > Site building > Menus. You can add a 'Contact' menu item as described in the Working with Menus section.

Using it in content

To add a link to a content page use <a href="/contact">Contact Us</a>.

Need a customized contact form? Check the WebForm, Contact Forms or CCK modules.

Contact form spam

If you find you're getting spam emails through your contact form, check out the Gotcha module or use the Captcha module.

Comments

Totally new

I was able to add the link to the contact form, but I would prefer that, when people click on my Contact Us Primary Link, it would go directly to the form and not a link to a form... How do I do this... Thanks for the info in advance!

Go to

Go to admin/sitebuilding/menu/primary links.
Then add or edit "CONTACTS" menu.
Under "path", type the path that leads to the contact form: "contact" or "/contact".
That should do it.

How to add links to contact form

I am newbie to drupal.
i have created two categories called "Fruits" and "Vegitables" now how can i link the contact form in naviagtion menu as well as in main menu such that "Fruits" category should be default in navigation menu and "Vegitables" in main menu.
I am using Drupal 7
Plz help
Thnks in advance

Hmm...

I haven't tried it in D7 yet, but try "contact/fruits" and "contact/vegetables".