You are here

function fieldgroup_display_overview_form_row in Content Construction Kit (CCK) 5

1 call to fieldgroup_display_overview_form_row()
fieldgroup_display_overview_form in ./fieldgroup.module

File

./fieldgroup.module, line 473
Create field groups for CCK fields.

Code

function fieldgroup_display_overview_form_row($group) {
  $defaults =& $group['settings']['display'];

  //shortcut
  $label_options = array(
    'above' => t('Above'),
    'hidden' => t('<Hidden>'),
  );
  $options = array(
    'no_style' => t('no styling'),
    'simple' => t('simple'),
    'fieldset' => t('fieldset'),
    'fieldset_collapsible' => t('fieldset - collapsible'),
    'fieldset_collapsed' => t('fieldset - collapsed'),
    'hidden' => t('<Hidden>'),
  );
  $row = array();
  $row['group_label'] = array(
    '#value' => check_plain($group['label']),
  );
  $row['label'] = array(
    '#type' => 'select',
    '#options' => $label_options,
    '#default_value' => isset($defaults['label']) ? $defaults['label'] : 'above',
  );
  foreach (_content_admin_display_contexts() as $key => $title) {
    $row[$key] = array(
      '#type' => 'select',
      '#options' => $options,
      '#default_value' => isset($defaults[$key]) ? $defaults[$key] : 'fieldset',
    );
  }
  return $row;
}