You are here

function theme_fel_form_element_description in Form element layout 7

Renders the #description of a form element.

9 theme calls to theme_fel_form_element_description()
fel_fields_field_group_pre_render_alter in modules/fel_fields/fel_fields.module
Implements hook_field_group_pre_render_alter().
theme_fel_fieldset in ./fel.module
Replacement theme for 'fieldset'.
theme_fel_fields_collection_table in modules/fel_fields/fel_fields.theme.inc
Theme replacement for 'field_collection_table_multiple_value_fields'.
theme_fel_fields_matrix_table in modules/fel_fields/fel_fields.theme.inc
Theme replacement for 'matrix_table'.
theme_fel_fields_multipage_pane in modules/fel_fields/fel_fields.theme.inc
Theme replacement for 'multipage_pane' from field_group.module.

... See full list

File

./fel.module, line 141
Reorder #title, #description and #children in forms.

Code

function theme_fel_form_element_description($variables) {
  $element = $variables['element'];
  if (empty($element['#description'])) {
    return '';
  }
  $description_classes = array(
    'description',
  );
  if (!empty($element['#description_classes'])) {
    $description_classes = array_merge($description_classes, $element['#description_classes']);
  }
  return '<div class="' . implode(' ', $description_classes) . '">' . $element['#description'] . "</div>\n";
}