function fieldgroup_content_fieldgroup_content_type_edit_form in Content Construction Kit (CCK) 6.3
Same name and namespace in other branches
- 6.2 modules/fieldgroup/panels/content_types/content_fieldgroup.inc \fieldgroup_content_fieldgroup_content_type_edit_form()
Returns a settings form for the custom type.
File
- modules/
fieldgroup/ panels/ content_types/ content_fieldgroup.inc, line 102 - This file provides a CTools content type for fieldgroups.
Code
function fieldgroup_content_fieldgroup_content_type_edit_form(&$form, &$form_state) {
$conf = $form_state['conf'];
$label_options = array(
'normal' => t('Block title'),
'above' => t('Above'),
);
$form['label'] = array(
'#type' => 'select',
'#title' => t('Field group label'),
'#default_value' => !empty($conf['label']) && isset($label_options[$conf['label']]) ? $conf['label'] : 'hidden',
'#options' => $label_options,
'#description' => t('Configure how the field group label is going to be displayed. This option takes no effect when "Override title" option is enabled, the specified block title is displayed instead.'),
);
$format_options = array(
'simple' => t('Simple'),
'fieldset' => t('Fieldset'),
'fieldset_collapsible' => t('Fieldset - Collapsible'),
'fieldset_collapsed' => t('Fieldset - Collapsed'),
);
$form['format'] = array(
'#type' => 'select',
'#title' => t('Field group format'),
'#default_value' => !empty($conf['format']) && isset($format_options[$conf['format']]) ? $conf['format'] : 'simple',
'#options' => $format_options,
'#description' => t('This option allows you to configure the field group format.'),
);
$form['empty'] = array(
'#type' => 'textarea',
'#title' => t('Empty text'),
'#description' => t('Text to display if group has no data. Note that title will not display unless overridden.'),
'#rows' => 5,
'#default_value' => $conf['empty'],
);
}