Tech Tips on Computers, Internet, Blogging, Web Development, Social Media, Android and more

Full width home advertisement

Post Page Advertisement [Top]


contact form drupal

The Contact module allows visitors to contact site administrators and other users. Users specify a subject, write their message, and can have a copy of their message sent to their own e-mail address. For more information, see the online handbook entry for Contact module.

This post describes how to enable the contact form and add a menu link to a Drupal website.

Types of contact forms in Drupal:
  1. User contact forms
    1. Site users can be contacted with a user contact form that keeps their e-mail address private. Users may enable or disable their personal contact forms by editing their My account page.
    2. If enabled, a Contact tab leads to a personal contact form displayed on their user profile. Site administrators are still able to use the contact form, even if has been disabled. The Contact tab is not shown when you view your own profile.
  2. Site-wide contact forms
    1. The Contact page provides a simple form for users with the Use the site-wide contact form permission to send comments, feedback, or other requests.
    2. You can create categories for directing the contact form messages to a set of defined recipients. Common categories for a business site, for example, might include "Website feedback" (messages are forwarded to website administrators) and "Product information" (messages are forwarded to members of the sales department).

Steps to enable and add the contact form page in Drupal website:


Check if the Contact module (part of Drupal 7 core) is enabled

    1. Go to Admin > Modules and check if the contact module is checked. If not, check and save

Set permissions for Contact module

    1. Set which user types should be allowed to use the contact form
    2. Go to Admin > Modules and corresponding to “Contact” module, click on “Permissions”. This will take you to the permissions setting page.
    3. Scroll down till you find “Contact”.
    4. Check “Anonymous User” corresponding to “Use the site-wide contact form “ if you want anonymous user (user who is not logged in ) to contact you.
    5. Use users' personal contact forms : see if this is required. See types of contact forms as described above.

Enabling the Contact form menu in Drupal

    1. When the site-wide contact form is enabled, a link in the main Navigation menu is created, but the link is disabled by default. This menu link can be enabled on the Menus administration page.
    2. Go to “Home » Administration » Structure » Menus”
    3. Corresponding to “Navigation”, click on “list menus”
    4. Check the checkbox corresponding to “Contact”
    5. Save configuration

 

Creating a main menu link for the contact form

    1. Go to “Home » Administration » Structure » Menus”
    2. Corresponding to “Navigation”, click on “list menus”
    3. Corresponding to “Contact’ click on “edit”. You are at “Edit Menu Link” page.
    4. Menu link title : name the contact form page. Normally “contact” or “contact us”
    5. Check “Enabled”
    6. Parent link : Click the drop down menu and scroll up. Then select “<Main menu>”
    7. Weight: set the weight, that is the order of display. Usually a larger value to show at the end of the main menu.
    8. Click Save
    9. Save configuration
Refresh your website and you should see a menu item added to the main menu for contact form.

Was this post helpful? Leave me your comments.

No comments:

Post a Comment

Bottom Ad [Post Page]