Skip to main content
Time and again I’ve faced a problem of creating multiple contact forms but with use of the contact module there is only once contact form accessible at site-URL/contact. But now the problem can be solved with use of Contact Forms module, you can download the module here.

With Contact Forms module installed you can create multiple categories of contact forms and on top of it you can also send the subject for the contact e-mail as a URL parameter which opens up new possibilities in contact. I’ll show one usage I did using this module with a contact for booking.

Simple Usage

Assuming that you are familiar with Drupal module installation and simple usage I’m writing the things below. Follow theses steps to use contact forms for separate things like contact us, contact advertising for now:
  1. Download the module here, and install it to your Drupal site.
  2. Activate the module from Modules page from Admin settings. (You will need admin rights to do this)
  3. Then go to Administer>>Contact Form to get a page like below and click “Add Category”:

  4. Fill details and click submit:

  5. Then you can access the contact form at site-url/contact/us.
  6. Try contact/us/For advertising and see a result like below:

  7. Make other categories as per need and use them accordingly. Like you can make different contact forms for marketing, contact, webmaster etc.

Creative Use: with theme tweak

Now lets use a contact form called booking for booking trips/hotels or anything. Main thing is the node title should be passed via the URL and some text + Node title should appear in the subject. For ex: subject should be like Booking For: ABC hotel where ABC hotel is the node title.

Steps to follow to do this:
  1. Make a different contact category/form called booking accessible at site-URL/contact/booking and make sure anonymous users have access to this module check Adminstrator>>User>>Access control
  2. Tweak your node-type.tpl.php file, like if its a trip page then make trip.tpl.php and edit it as below:

    Get the code here.

  3. Then check out your node page like if its your booking page check that out, to see something like:

  4. On link click you might see something like:

  5. You have done it congrats.
Have fun using this methods to organize your contact forms in Drupal site in a better manner. Hope you benefit from it.

Drupal will change the world :-), keep Drupalling..