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	19 Oct 2009 14:50:58 -0000
@@ -22,6 +22,13 @@ function contact_forms_uninstall() {
   variable_del('contactform_title');
   variable_del('contactform_redirect');
 
+  //remove category specific variables
+  $sql = 'SELECT cid FROM {contact}';
+  $result = db_query($sql);
+  while($contact = db_fetch_object($result)){
+    variable_del("contactform_{$contact->cid}_info");
+  }
+  
   // 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	19 Oct 2009 14:50:58 -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(variable_get("contactform_{$categories_data['cid']}_info",variable_get('contactforms_information' , 'You can send !category a message using the contact form below.')) , array('!category' => $categories_data['category'])),
     );
 
     $subject = str_replace(  '_' , ' ' , arg(2));
@@ -53,6 +53,21 @@ function contact_forms_form_alter(&$form
     );
   }
 
+  //Alter the contact Category Forms
+  if($form_id == 'contact_admin_edit'){
+    $cid = $form['cid']['#value'];
+	//Adds a text area that will hold category specific info for the contact page information
+        $form['contactforms_cat_information'] = array(
+      '#type' => 'textarea',
+      '#title' => t('Category Page Information'),
+      '#weight' => 0,
+      '#default_value' => variable_get("contactform_{$cid}_info", ''),
+      '#description' => t('Information to show on the individual contact page.'),
+    );
+    $form['category']['#weight']='-1';
+    $form['#submit'][] = 'contact_forms_admin_edit_form_submit';
+  }
+  
   // Alter contact settings form
   if ($form_id == 'contact_admin_settings') {
 
@@ -103,4 +118,12 @@ $form['contact_form_information'] = arra
  */
  function contact_forms_menu_alter(&$items) {
   $items['contact/%'] = $items['contact'];
+}
+/**
+ * Additional Submit Handler for contact_admin_edit form
+ * Saves the added variables for the contact_forms module category pages 
+ */
+function contact_forms_admin_edit_form_submit($form, &$form_state){
+    $cid = $form_state['values']['cid'];
+    variable_set("contactform_{$cid}_info", $form_state['values']['contactforms_cat_information']);
 }
\ No newline at end of file
