function patterns_forms_get_info_section in Patterns 7
Same name and namespace in other branches
- 7.2 includes/forms/forms.inc \patterns_forms_get_info_section()
2 calls to patterns_forms_get_info_section()
- patterns_export_page1 in patterns_export/
patterns_export.module - patterns_lab in includes/
forms/ lab.inc - @file Functions related to exporting patterns.
File
- includes/
forms/ forms.inc, line 176
Code
function patterns_forms_get_info_section(&$form = array(), $info = array(), $options = array()) {
$info = array_merge($info, patterns_api_add_info_section($info));
$collapsed = isset($options['collapsed']) && $options['collapsed'] == TRUE ? TRUE : FALSE;
$form['info'] = array(
'#type' => 'fieldset',
'#title' => 'Info Section',
'#collapsible' => TRUE,
'#collapsed' => $collapsed,
'#tree' => TRUE,
);
foreach ($info['info'] as $i => $value) {
$form['info'][$i] = array(
'#type' => 'textfield',
'#title' => t($i),
'#required' => TRUE,
'#default_value' => $value,
);
}
return $form;
}