Index: subform_element.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/subform_element/Attic/subform_element.module,v
retrieving revision 1.1.2.8
diff -u -r1.1.2.8 subform_element.module
--- subform_element.module	1 May 2007 11:59:34 -0000	1.1.2.8
+++ subform_element.module	7 May 2008 21:53:50 -0000
@@ -18,6 +18,7 @@
     '#redirect' => false,
     '#arguments' => array(),
     '#data_separation' => TRUE,
+    '#strip_buttons' => TRUE,
   );
   return $type;
 }
@@ -41,6 +42,14 @@
     $subform['#pre_render'][] = 'subform_element_separate_data';
   }
 
+  if ($form_element['#strip_buttons']) {
+    foreach (element_children($subform) as $key) {
+      if ($key == 'buttons' || (isset($subform[$key]['#type']) && in_array($subform[$key]['#type'], array('button', 'submit')))) {
+        unset($subform[$key]);
+      }
+    }
+  }
+
   //if the form has been submitted, set the form_id to the subform's id
   if (isset($form_element['#post']) && isset($form_element['#post']['form_id'])) {
     $subform['#post'] = $form_element['#data_separation'] ? $_POST[$form_id] : $form_element['#post'];

