Index: contact_forms.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/contact_forms/contact_forms.install,v
retrieving revision 1.5
diff -u -p -r1.5 contact_forms.install
--- contact_forms.install	31 Jan 2008 01:53:34 -0000	1.5
+++ contact_forms.install	20 Oct 2009 13:48:24 -0000
@@ -5,6 +5,10 @@
  * Implementation of hook_install().
  */
 function contact_forms_install() {
+   //Alter the contact table to add an info field for each category
+   $sql = 'ALTER TABLE {contact} ADD page_info TEXT NULL';
+   db_query($sql);
+   
   // contact_list.module is enabled - disable and put message in watchdog saying contact_forms replaces contact_lists
   watchdog ('Contact Forms', 'contact_forms module installed');
   drupal_set_message(t("Contact Forms module has been enabled. You can edit it's settings at !link",
@@ -22,6 +26,10 @@ function contact_forms_uninstall() {
   variable_del('contactform_title');
   variable_del('contactform_redirect');
 
+  //remove category information field
+  $sql = 'ALTER TABLE {contact} DROP page_info';
+  db_query($sql);
+  
   // clear the cache tables
   cache_clear_all(null, 'cache');
   cache_clear_all(null, 'cache_filter');
Index: contact_forms.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/contact_forms/contact_forms.module,v
retrieving revision 1.13
diff -u -p -r1.13 contact_forms.module
--- contact_forms.module	11 Oct 2009 05:41:04 -0000	1.13
+++ contact_forms.module	20 Oct 2009 13:48:24 -0000
@@ -20,9 +20,9 @@ function contact_forms_form_alter(&$form
   // Alter all contact forms except for /contact
   if ($form_id == 'contact_mail_page' && $path != 'contact') {
 
-    $category = str_replace(  '_' , ' ' , arg(1));
-    $query =  db_query("SELECT * FROM {contact} WHERE category = '%s'", $category);
-    $num = db_result(db_query("SELECT COUNT(*) FROM {contact} WHERE category = '%s'", $category));
+    $category = str_replace( array('-','_') , ' ' , arg(1));
+    $query =  db_query("SELECT * FROM {contact} WHERE LOWER(category) = LOWER('%s')", $category);
+    $num = db_result(db_query("SELECT COUNT(*) FROM {contact} WHERE LOWER(category) = LOWER('%s')", $category));
     //if category doesn't exist redirect to 'contact' or User Defined Page
     if (!$num) {
       drupal_goto(variable_get('contactform_redirect', 'contact'));
@@ -34,7 +34,7 @@ function contact_forms_form_alter(&$form
 
     $form['contact_information'] = array(
       '#type' => 'markup',
-      '#value' => t(variable_get('contactforms_information' , 'You can send !category a message using the contact form below.') , array('!category' => $categories_data['category'])),
+      '#value' => t((!$categories_data['page_info'] ? variable_get('contactforms_information' , 'You can send !category a message using the contact form below.') : $categories_data['page_info']) , array('!category' => $categories_data['category'])),
     );
 
     $subject = str_replace(  '_' , ' ' , arg(2));
@@ -53,6 +53,25 @@ function contact_forms_form_alter(&$form
     );
   }
 
+  //Alter the contact Category Forms
+  if($form_id == 'contact_admin_edit'){
+    $cid = $form['cid']['#value'];    
+    if ($cid) {
+    $contact = db_fetch_object(db_query('SELECT * FROM {contact} WHERE cid = %d', $cid));
+    }
+    
+    //Adds a text area that will hold category specific info for the contact page information
+        $form['page_info'] = array(
+      '#type' => 'textarea',
+      '#title' => t('Category Page Information'),
+      '#weight' => 0,
+      '#default_value' => $contact->page_info,
+      '#description' => t('Information to show on the individual contact page.'),
+    );
+    //Set the weight of the category name so It appears above our inserted info area
+    $form['category']['#weight']='-1';
+  }
+  
   // Alter contact settings form
   if ($form_id == 'contact_admin_settings') {
 
@@ -103,4 +122,16 @@ $form['contact_form_information'] = arra
  */
  function contact_forms_menu_alter(&$items) {
   $items['contact/%'] = $items['contact'];
+}
+/**
+ * Implementation of hook_schema_alter
+ */
+function contact_forms_schema_alter(&$schema) {
+  // Add field to existing schema.
+  $schema['contact']['fields']['page_info'] = array(
+    'type' => 'text',
+	'not null' => FALSE,
+    'size' => 'big',
+    'description' => 'Category Page Information Displayed on the individual category pages',
+  );
 }
\ No newline at end of file
