john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

drupal contact form

The Contact form is part of the Core (optional) module.

Administer -> Site Building -> Modules (list)

Enable it by filling in the checkbox. Then configure it using:

Administer -> Site Building -> Contact Form -> Settings

Uncheck "personal" form (this is the built in Drupal method for users to communicate with other users without exposing their email addresses... but that's more than we need right now).

When a contact form is filled out the user will fill in: Their name, email address, subject, message and...

"Category" (which is where we define the destination email address and if we want an "auto reply").

Now create some "Categories" a new one by "Add Category"

Fill in the "Category" (what the user sees, e.g. "Support"), the email recipient(s), any auto-reply message Create as many "categories" as you need (pre sales, post sales, apply for a job, etc.)

Once you've saved it you can immediately access it via: http://website.com/contact

Now to link it to the menu system, Administer -> Site Building -> Menus -> Primary Links

Add Item Path: contact Menu Link Title: Contact Us Enabled with Parent Primary Links

List items allows you to rearrange the order of your Primary Links...

Finally we've got to enable permissions for users to use the Form... Administer -> User Management -> Permissions

Click the checkboxes for the roles (e.g. anonymous) that should be able to see and use Contact.

Note that the "Administer -> Site Building -> Menus -> Navigation" modifies the Administrator menu (and perhaps default menu for everyone depending on how you've configured it)...

Now you can test it (either by logging out or using a different browser)... Notice that by default when a contact form is filled it returns the user to the Home Page


  • « win click follow clock
  • php index 2009 03 22 »

Published

Feb 15, 2010

Category

drupal

~293 words

Tags

  • contact 3
  • drupal 43
  • form 20