--- webform_table_element.module.original       2011-10-24 01:42:45.532485170 +0200
+++ webform_table_element.module        2011-10-24 01:45:06.735994537 +0200
@@ -162,11 +162,13 @@ function _webform_theme_table_element()
  * Theme callback
  */
 function theme_table_element($element) {
-  $output = '<table><thead><tr class="row-0"><th class="col-0"></th>';
+  $output = '';
+  if ($element['#title_display']!='none') 
+    $output .= '<h4 class="webform-component-table_title webform-component-table_title_'.$element['#webform_component']['cid'].'">'.$element['#title'].':</h4>';
+  $output .= '<table><thead><tr class="row-0"><th class="col-0"></th>';
   $col_counter = 1;
-  foreach ($element['#row_titles'] as $title) {
+  foreach ($element['#row_titles'] as $title)
     $output .= '<th class="col-' . $col_counter++ . '">' . $title . '</th>';
-  }
   $output .= '</tr></thead><tbody>';
   $output .= ( !empty($element['#children']) ? $element['#children'] : '');
   $output .= '</tbody></table>' . (isset($element['#value']) ? $element['#value'] : '') . "\n";

