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

Full width home advertisement

Post Page Advertisement [Top]


How to create separate contact forms in Drupal website?

contact me form example drupal

How to create separate contact forms in Drupal website? Contact module is a part of Drupal 7 core, however, it is usually disabled by default.This post is on how to create different types of contact us forms in Drupal.


For example, you want emails from the contact us page to go to different departments depending upon user queries such as sales@yoursite.com for sales queries, productinfo@yoursite.com, feedback@yoursite.com etc. We can easily setup contact form for such purposes. Ideally, you should create the required emails first. For that you need to login to your hosting admin panel and setup email addresses for each of these departments. If you wan to do that later, that is also fine.

To setup different contact forms in Drupal, follow the steps below:

  • Login to Drupal as admin
  • Go to Modules and find Contact Module
  • Enable to Contact module  
After making changes to modules, Update Script should be run. Then also check permissions to give appropriate permissions for registered as well as anonymous users to use the sitewide contact form or not.
  • Then go to Structure
  • Click on “Contact Form”
  • By default, you will see “Website feedback” category and recipient for that as the email used during Drupal installation or whatever is entered in site configuration details.
  • To add a new contact form category, click on “add category”
    • Name the category and enter email address of the recipient.
    • Set auto reply if required
    • Set weight (to set the order of display in the dropdown)
    • Set “selected” to “yes” if you want this type to be selected by default
    • save
Repeat the same process for other contact forms to be created.
 
Following screenshot shows example of different contact forms created in Drupal - General, Query, and website feedback.



When a user access the /contact link, the user sees a dropdown from where he can select the appropriate contact form to send the query to.


No comments:

Post a Comment

Bottom Ad [Post Page]