You are here

function vertical_tabs_process_element in Vertical Tabs 6

Process an element for vertical tabs.

1 call to vertical_tabs_process_element()
vertical_tabs_add_vertical_tabs in ./vertical_tabs.module
Add a vertical tab form element to a form.

File

./vertical_tabs.module, line 405
Provides vertical tabs capability for fieldsets in forms.

Code

function vertical_tabs_process_element(&$element, $key) {

  // Merge defaults.
  $element += array(
    '#attributes' => array(),
  );
  $element['#attributes'] += array(
    'class' => '',
  );

  // Add a class to identify the fieldset.
  $element['#attributes']['class'] .= ' vertical-tabs-fieldset vertical-tabs-' . $key;
  return $element;
}