--- C:/Documents and Settings/Aragorn/My Documents/hierarchical_select/modules/hs_content_taxonomy.module	Thu Aug 26 02:01:14 2010
+++ D:/webserver/wamp/www/Drupal6/sites/all/modules/hierarchical_select/modules/hs_content_taxonomy.module	Thu Sep 16 22:20:43 2010
@@ -47,6 +47,9 @@
       }
     }
   }
+  elseif ($form_id == 'hs_content_taxonomy_config_form') {
+    $form['hierarchical_select_config']['save_lineage']['#description'] .= t(' WARNING: If you place this in a multigroup, you must set this to NOT save the whole lineage.');
+  }
 }
 
 /**
@@ -72,6 +75,7 @@
   foreach ($form['#field_info'] as $field_name => $field_info) {
     if ($field_info['widget']['type'] == 'content_taxonomy_hs') {
       // Change format of values to the one Content Taxonomy expects
+      drupal_set_message('<pre>TIDS: ' . print_r($form_state['values'][$field_name]['tids'], TRUE) . '</pre>');
       if (is_array($form_state['values'][$field_name]['tids'])) {
         $values = array();
         foreach($form_state['values'][$field_name]['tids'] as $tid) {
@@ -79,6 +83,7 @@
           array_unshift($form_state['values'][$field_name], array('value' => $tid));
         }
         $form_state['values'][$field_name]['tids'] = $values;
+        drupal_set_message('<pre>TIDS 2: ' . print_r($form_state['values'][$field_name]['tids'], TRUE) . '</pre>');
       }
       else {
         $values[] = array('value' => $form_state['values'][$field_name]['tids']);
@@ -159,6 +164,7 @@
   require_once(drupal_get_path('module', 'hierarchical_select') .'/includes/common.inc');
   $node = &$form['#node'];
 
+  $element = array();
   // Extremely ugly checks because CCK/Content Taxonomy is a big failure.
   $selected_items = array();
   if (isset($items[$field_name])) {
@@ -184,9 +190,9 @@
   }
 
   $node_field = &$node->$field_name;
-  $form[$field_name]['#tree'] = TRUE;
-  $form[$field_name]['#weight'] = $field['widget']['weight'];
-  $form[$field_name]['tids'] = array(
+  $element[$field_name]['#tree'] = TRUE;
+  $element[$field_name]['#weight'] = $field['widget']['weight'];
+  $element[$field_name]['tids'] = array(
     '#title' => t($field['widget']['label']),
     '#type' => 'hierarchical_select',
     '#weight' => $field['widget']['weight'],
@@ -204,8 +210,8 @@
   );
   unset($form[$field_name]['#options']); // Unset to prevent passing around of possibly huge HTML.
   unset($form[$field_name]['#theme']);   // Unset to prevent theme_taxonomy_term_select() from running.
-  hierarchical_select_common_config_apply($form[$field_name]['tids'], "content-taxonomy-$field_name");
-  return $form;
+  hierarchical_select_common_config_apply($element[$field_name]['tids'], "content-taxonomy-$field_name");
+  return $element;
 }
 
 //-------------------------------------------------------------------------------------------------------
@@ -556,4 +562,14 @@
     }
   }
   return in_array($tid, $valid_tids[$vid][$root_tid][$allowed_depth]);
+}
+
+//we just need to turn off the option to store full lineage if we go in here.
+function hs_content_taxonomy_content_multigroup_allowed_widgets() {
+  return array('content_taxonomy_hs');
+}
+
+//once in, the deltas used in multigroups would be different than those used outside
+function hs_content_taxonomy_content_multigroup_no_remove_widgets() {
+  return array('content_taxonomy_hs');
 }
