Last updated September 10, 2012. Created by O Govinda on May 9, 2005.
Edited by Fiable.biz, petednz, arianek, LeeHunter. Log in to edit this page.
The Contact module allows site visitors to send emails to other authenticated users and to the site administrator.
Uses
Through personal contact forms users can send one another e-mail. And through site-wide contact forms, users can send e-mail to arbitrary email addresses, such as the site maintainers.
With either form, users can specify a subject, write their message, and also have a copy of their e-mail sent to their own address. Through contact forms, users allow themselves to be contacted yet keep their own e-mail addresses private until the message is replied to. As an administrator, you can enable or disable the contact module altogether.
As a user, you can also enable or disable your personal contact form if that option has been provided. When the form is enabled, a contact tab is displayed in your user profile, for everyone to see. (Privileged users such as site administrators can contact users who have turned their forms off, as they can access their user account email addresses.) When you visit your own profile, the contact tab is not displayed. However, it is displayed to other users (if it has been enabled).
You can set up "categories" for the site-wide contact form, to allow for multiple recipient options. For example, one category might be "website feedback," and another might be "product information." For each category, you can specify one or more email addresses to which the form will be sent. You can also specify whether or not the user will receive an automatic reply.
You can specify the text to display on your site-wide contact page and you can optionally limit how many times a user can submit a contact form in an hour.
Configuration
Enabling Contact module
To enable the Contact module:
- Navigate to the Modules administration page (Administration > Modules or
http://example.com/admin/modulesin Drupal 7; Administer > Site building > Modules orhttp://example.com/admin/build/modulesin Drupal 6). - In the Core module section, enable the Contact module.
- Click Save configuration.
Configuring the site-wide Contact form
- Navigate to the Contact Form administration page. (Administration > Structure > Contact or
http://example.com/admin/structure/contactin Drupal 7; Administer > Site building > Contact form orhttp://example.com/admin/build/contactin Drupal 6). - Click "Add a Category" and enter the following information:
- Category: Enter a title.
- Recipients: Enter one or more email addresses. Separate each address with a comma.
- Auto-Reply: Enter an optional response such as an acknowledgement of receipt. Leave this field empty if you do not want to send an automated response.
- Weights: Set the order in which categories will be displayed.
- Selected: Specify whether you want this category selected by default.
In Drupal 6, you can specify further settings:
- Navigate to the Contact Form settings page (
http://example.com/admin/build/contact/settings) - In the "Additional Information" section, enter the text to display with the contact form.
- In the "Hourly Threshold" list, select the maximum number of submissions that a user can make per hour.
Configure the user Contact form
- Navigate to the Account Settings page (Administration > Configuration > People > Accounts or
http://example.com/admin/config/people/accountsin Drupal 7; Administer > Site building > Contact form > Settings orhttp://example.com/admin/build/contact/settingsin Drupal 6). - In the Contact settings section, specify whether the contact form is enabled for users by default. Changing this form does not affect existing users. (This appears to be an option for Drupal 6 but not D7 - where is the option to change the default setting for whether a new account has the Personal Contact Form set to be ON or OFF?)
- Click "Save configuration."
Permissions
Drupal 7
- Navigate to the Permissions page (Administration > People > Permissions or
http://example.com/admin/people/permissions). - In the Contact section, specify whether a user role has the following permissions:
- Administer contact forms and contact settings: Only administrators should be granted this permission.
- Use the site wide contact form: Users with this permission can send messages to specific addresses that you specify.
- Use users' personal contact forms: Users with this permission can send messages to any authenticated user who has enabled the contact form in their user settings. Granting this permission to unauthenticated users may not be desirable.
- Click "Save Permissions."
Drupal 6
- Navigate to the Permissions page (Administer > User management > Permissions or
http://example.com/admin/user/permissions). - In the Contact section, specify whether a user role has the following permissions:
- Access Site Wide Contact Form: Users with this permission can send messages to specific addresses that you specify.
- Administer Site Wide Contact Form: Only administrators should be granted this permission.
- Click "Save Permissions."
Menu link
If you want your contact form to appear in a menu, go to Structure → Menus → Navigation → List links. Click on the "enable" checkbox at the right of the contact item, click on "Save" at the bottom. Then click on "edit" at the right of the contact item, and in "Parent link" choose Main menu
. Thanks to the "weight" you can choose at what place the item will appear in the menu. The heavier is the item the lower (for a vertical menu) or the righter (for an horizontal menu and a left-to-right theme) it will appear. Don't forget to click on "Save". In the Main menu list ( Structure → Menus → Main menu → List links) you move the Contact item to the location you want by can dragging and dropping its handle in form of arrowed cross, on the left. This will change the item weight. Don't forget to click on "Save". If you want to translate the menu item for your contact form, do it with the interface translation feature of the contributed module "internationalization": see HowTo: Basic Internationalization setup.
Adding content to the form
If you want to add text (for instance your phone number) or photos etc. to your form page, you can do that by adding a block (or several blocks) which will appear only on the contact form. See Working with blocks (content in regions)
Module development
How can you get involved?
Maintainer
The current maintainer of core's Contact module is Dave Reid.
Comments
Is posssible disable user contact form?
I'd like a web has a site-wide contact form, but I don't want user can enable their personal contact forms.
Is it possible?
Regards
www.calbasi.net
Ps: If you can not understand me, it's my poor English skills fault :-p
looking for this as well
i haven't seen this either yet.. but seems like a pretty obvious use case
Peter Lindstrom
LiquidCMS - Content Solution Experts
Users cannot enable contact form if you uncheck permissions
Hello!
if you only need to set up a contact form on your website for all visitors regardless of registered or anonymous users and do not want authenticated users to enable their personal contact form -----on Drupal 7--- Just go to admin/people >>on permissions tab<< scroll down to CONTACT section and you will see three (3) options on left side as shown bellow: (if you do not see any contact items there - you need to enable the contact module on the drupal CORE modules section at admin/modules/ core section and check "contact" then save configuration and you will see the following bellow:
Contact
Administer contact forms and contact form settings
Use the site-wide contact form
Use users' personal contact forms
On the right site there are permission check boxes for
[anonymous user]
[authenticated user]
[administrator]
Just check all three boxes for the *****Use the site-wide contact form***** row and you are done. just save changes.
if you setup permissions for the [anonymous user] it is a must to install and enable a module for Preventing contact spam e-mails as noted on Drupal documentation that says: "there are lots of good spam-prevention modules that easily integrate and protect the contact forms and other forms (like comments, nodes, etc)." visit this link: http://drupal.org/node/206787
NOW to enable the contact form to appear as a main menu on top of your website like: home***about***products***CONTACT*** and so on;
on Drupal 7 go to Admin/structure/menus under --navigation-- section click on [LIST LINKS] operation and enable the [contact menu] which is disable by default on Drupal core - Save configuration and visit your Site's Front page on another Browser to tested. Contact menu link will work but is located on the navigation block. IF YOU NEED this Contact Menu to appear on top of your site along with the others menus Visit the admin/structure/menus under Navigation section click on LIST LINKS again and on CONTACT MENU row click on edit and make it disappear from [NAVIGATION] block and appear as Primary Link which are now called [MAIN MENU] on Drupal 7.
Have Fun with Drupal 7!
Regards.
Lorenzo
DO NOT MESS UP WITH THE CODE, INSTEAD USE DRUPAL 7 FANTASTIC BLOCK FEATURE TO PLACE INFORMATION ANYWHERE ON YOUR WEBSITE"
www.lorenzoreynaga.com , www.Athleto.com
Thank you very much for this
Thank you very much for this description in particular!
Is there possibility to insert contact form as a block at another page?
[SOLVED]
Here is the answer on my question: http://drupal.org/project/formblock
It adds a block for contact form.
Also Drupal 7 supported.
Contact form as a block
I could use the contact form as block but the problem is getting overlapped with the content in the page
I put the block left side, below the navigation menu.
Thanks
Thanks for the main menu contact form tip, just what I needed.
Contact Us workflow Status
Hi,
I am using site-wide contact Us form, but when user click "send email" submit button, the workflow automatically take the user to home page, without showing any sort of message, which could be very inconvenient for end user.
But in case user did not supply subject or other mistake, than it is properly reported. How can we show 'message successfully submitted' message?
Also, how can we change "send email" submit button text to "send message"?
Thank you.
contact menu link not translated
Hello
I've a bilingual site with drupal7, I use the contact form, and output its link in the main menu,
it says "This string will be localizable. You can translate it using the translate interface pages." for the title, but I can't find it in the translate interface, am I doing something wrong ?
thank you !!
UPDATE : the link is in the translate interface, I translated it, but it still keep showing in default language... any idea ??
Not working?
I've been having problems displaying a contact form on my page. I've followed the instructions above up until the part where it says to go to 'Structure' ... I cannot find contact form anywhere. Anyone else came across this problem? Help appreciated. Thanks!
hi scottiedude! have you
hi scottiedude! have you resolved this problem? ive encountered quite the same thing. i followed the instructions above but instead of finding Contact under Structure, i found it in the Administration menu bar at the top of the page with a label of "Contact form". using the drag-and-drop feature in the Administration/Structure/Menus/Management, i was able to put it under Structure.
now, i've read this line from the config page of the Contact form
i tried to look for the said menu item under Navigation but found none and i can't find any contact form in the site. i also tried to put the Navigation block in a specific region but it didn't make any changes.
any advice? and btw, im using D7. thanks!
hi scottiedude! have you
hi scottiedude! have you resolved this problem? ive encountered quite the same thing. i followed the instructions above but instead of finding Contact under Structure, i found it in the Administration menu bar at the top of the page with a label of "Contact form". using the drag-and-drop feature in the Administration/Structure/Menus/Management, i was able to put it under Structure.
now, i've read this line from the config page of the Contact form
i tried to look for the said menu item under Navigation but found none and i can't find any contact form in the site. i also tried to put the Navigation block in a specific region but it didn't make any changes.
any advice? and btw, im using D7. thanks!
what i did was, i added the
what i did was, i added the contact node in the main menu by putting "contact" as the link. HIH
I'm having same problem
In Drupal 7 I enabled the contact module and set the permissions but I also can't find the contact form anywhere.
I discovered that if I cleared the cache and changed the admin theme the new stuff shows up.
Can you retrieve message sent through contact form
I didn't realize when I added a site-wide contact form, that individuals would have a link as well. Is it possible to retrieve messages that were sent directly to a users email? In other words, is the content of a contact form stored anywhere on the system?
thanks
subscribing
subscribing
Can't save contact form text - generates 404
Maintaining several sites using separate 6.22 Drupal installs, only one drupal install has recently gone into a glitch where saving the contact form text in /admin/build/contact/settings generates a 404 (not found) at apache level. The other similar drupal installs behave correctly in this matter.
I've gone through several hoops to try and get rid of this error - to no avail. I've disabled/enabled the contact module, deleted category etc. The 404 keeps appearing - also when i try to change the hourly threshold or change the "Enable personal contact form by default" option.
Checked .htaccess, which seems ok - the other pages all work well. Clean URLs work allover the site.
Drupal permissions are set correctly - at file level the contact module has the correct file permissions. Similar to the other 6.22 Drupal installs. I've rebuild permissions at Drupal level, checked the database using PHPmyadmin etc. All seems ok.
Somehow the path translation is somehow messed up. When the save "configuration button" is pressed resulting in this code
form action="/SUBDIR/admin/build/contact/settings" accept-charset="UTF-8" method="post" id="contact-admin-settings"
I get the APACHE 404 error.
Clearing cache and disabling performance options doesn't help either.
how can i pinpoint and solve this problem?
Thx!
Nomad
For anyone bending over
For anyone bending over backwards in the future to solve a similar problem with the contact form text. In my case I got around this problem by reversing my edits in the form text field below from:
<p>You can leave a message using the contact form below.</p>"<p class="rtecenter"><a href="http://twitter.com/SomeUSER" target="_blank"><img src="http://www.mysite.com/SUBIR/sites/default/files/follow_me-c_0.png" alt="Follow SomeUSER at Twitter" /></a><br />
</p>
to the standard text again like:
<p>You can leave a message using the contact form below.</p>I don't know yet what part of the above text causes the 404 error.
FCKeditior 6.x-1.4 was loaded to edit the form text field.
In a previous Drupal (several upgrades ago) release the form text (with twitter link) was saved without a problem.
Found the issue
The 404 turns out to be a 403 (forbidden) and is
caused by a mod security config at the server.
Had nothing to do with Drupal.
POST statements are filtered and in thus
isolated case the mod security filter trips a 403.
Read about it here
http://drupal.org/node/110219
Word Wrap
How can I add word wrap to the Contact Form?
Thanks,
Beth
is possible to specify text to display in Drupal 7?
In D6 we can specify a text to be displayed with the contact in the "Additional Information" section.
I can't find any similar option in D7.
Is this possible?
Thanks.
Blocks
1) Create a block with the info you want to display.
2) Configure the block to appear before (or after) the main content block.
3) Show it only in the contact page.
HIH
"Hourly Threshold" in D7
There are instructions for how to edit the threshold list for users on an hourly basis above for D6:
But, how do we do this in D7? As mentioned, the links have changed. But I'm not even sure that the functionality was ported over.
--
OpenConcept | Twitter @mgifford | Flattr
still searching for changing threshold list
For Drupal 7, where do i get settings to change the No of mail limit per hour ?
flood_control
http://drupal.org/project/flood_control
--
Drupal Theming at
www.pitxels.com
Return Email Address
My contact form (d6) is not including the user's email address in the message it sends to me. Any idea how I can get it to do this? Seems like an important bit of information if you actually want to respond to the person...
You can simply reply
This info is sent in the e-mail like "from" header field, so you can simply reply the mail.
HIH
Problem Solved
Now that works. I was trying to send through gmail and they change the "FROM" header, so it wasn't working. Thanks for the help.
If anyone else has this problem use this postfix setup instead of gmail:
http://www.rackspace.com/knowledge_center/index.php/Postfix_-_Installation
Page Title on Contact Form
On the site-wide contact form, are we stuck with just the word "Contact" for the page title (both in the browser title bar and under the main menu)? I can't seem to figure out where to go to change "Contact" to say, for instance, "Contact Us" or "Give Us Your Feedback" or some other custom text. Any assistance would be appreciated!
File attachments in personal contact form in D7?
Is there a way for users to be able to send each other messages that include a file attachment? Thank you.
Contact form not working
I've enabled the contact form for my site at http://microclinics.org/contact. When I click Send message, I'm taken to the homepage with a message saying "Your message has been sent." However, nothing is actually sent to the email addresses I've specified. Do you have any recommendations on what the issue could be?
I've checked the spam for the inboxes the message should be sent to and I've tried sending and receiving from multiple email addresses, but the contact form isn't working. In Drupal, I've enabled the site-wide contact form and followed the recommended settings in the article above.
Contact form is not sending emails
I have added a Contact us form with my main email address as a recipient address.
https://www.afab-lab.com/dr/contact
The Contact form does not send email to my main email address but shows "Your message has been sent." message.
If I activate auto-reply option, then I receive the auto-reply message to the email address I fill in the contact form.
The web site is hosted on GoDaddy.
What am I missing?
Thank you.
PHP function to check whether contact form enabled or disabled
Hi
I rewrite the user page using Views. I have a link connected to the user contact form in my view. Of course, this link should not be shown when the user disabled his personal contact form. Does anyone have an idea how to solve this? Couldn't find a Views filter/relationship/permission setting etc. to find this out. Please help.
Thanks!
Worked it out via Views.
Worked it out via Views. Latest release brought "link to contact page" back in.
If there are other ways to achieve this, let me know.
Default settings for Contact form redirect field
I accidentally removed the text from the Contact Form Redirect field in the "Contact Form Settings page"
http://www.lrsd.org/drupal/#overlay=%3Fq%3Dadmin%252Fstructure%252Fconta...
Now my contact form will not display.
Can anyone help me out?
I've researched Bing and can't find the information I need. (My computer can't access Google right now)
Thank you to anyone who has the time...
Sender email address issue
Our company has recently outsourced our email needs to a 3rd party and our contact form no longer works. The reason for this is our smtp server requires the email sender to be the same as the account that we authenticated with . For instance if we authenticate against the smtp server with the username "notifications" then any email sent through that session must be sent on behalf of notifications@mysite.com. The drupal contact form is using the contacters email address as the sender which is blowing everything up. Is there an easy solution to this?
Same problem
I have the same issue - in the contact form recipients list, i have the following email address.... 123abc@yahoo.com (not this exact email address, but one that exists on yahoo and i use all the time)
On the contact form, i enter...
your name - TestPerson
your email address - 456def@yahoo.com (not this exact email address, but another i know exists and works...)
subject - Test Subject
message - Test Message
After i press send, i get one failure message and one success.
The successful message gets sent to 456def@yahoo.com stating a "thank you for contracting my website etc" (from 123abc@yahoo.com as i set this up as the admin email address).....
The failure is found in the recent log message stating... Error sending e-mail (from 456def@yahoo.com to 123abc@yahoo.com).
My question is why would this try to send an email from the address I have just entered on the contact form? this seems wrong to me?
thanks Matt