diff --git includes/webform.components.inc includes/webform.components.inc index a0edc75..aa7c66b 100644 --- includes/webform.components.inc +++ includes/webform.components.inc @@ -1030,6 +1030,9 @@ function webform_component_parent_keys($node, $component) { * Populate a component with the defaults for that type. */ function webform_component_defaults(&$component) { + if (empty($component['extra']['attributes']['title'])) { + $component['extra']['attributes']['title'] = check_plain($component['name']); + } if ($defaults = webform_component_invoke($component['type'], 'defaults')) { foreach ($defaults as $key => $default) { if (!isset($component[$key])) { diff --git webform.module webform.module index 697026f..0b17f68 100644 --- webform.module +++ webform.module @@ -2476,6 +2476,12 @@ function theme_webform_element($variables) { $output = '
' . "\n"; $required = !empty($element['#required']) ? '*' : ''; + // If #title_display is none, set it to invisible instead - none only used if + // we have no title at all to use. + if ($element['#title_display'] == 'none') { + $variables['element']['#title_display'] = 'invisible'; + $element['#title_display'] = 'invisible'; + } // If #title is not set, we don't display any label or required marker. if (!isset($element['#title'])) { $element['#title_display'] = 'none';