You are here

function field_group_pre_render_htab in Field Group 7

Same name and namespace in other branches
  1. 7.2 field_group.module \field_group_pre_render_htab()

Implements field_group_pre_render_<format-type>. Format type: Horizontal tab.

Parameters

$element The field group form element.:

$group The Field group object prepared for pre_render.:

$form The root element or form.:

File

./field_group.module, line 909
Fieldgroup module.

Code

function field_group_pre_render_htab(&$element, $group, &$form) {
  $element += array(
    '#type' => 'fieldset',
    '#title' => check_plain(t($group->label)),
    '#collapsible' => $group->collapsible,
    '#collapsed' => $group->collapsed,
    '#attributes' => array(
      'class' => explode(" ", $group->classes),
    ),
    '#group' => $group->parent_name,
    // very important. Cannot be added on the form!
    '#parents' => array(
      $group->parent_name,
    ),
    '#description' => $group->description,
  );
}