function og_ui_form_field_ui_field_edit_form_alter in Organic groups 7.2
Implements hook_form_FORM_ID_alter().
Add option to hide the OG_GROUP_FIELD.
See also
File
- og_ui/
og_ui.module, line 546 - Organic groups UI.
Code
function og_ui_form_field_ui_field_edit_form_alter(&$form, &$form_state) {
if ($form['#field']['field_name'] != OG_GROUP_FIELD) {
return;
}
$form['#instance']['widget']['settings'] += array(
'og_hide' => TRUE,
);
$form['instance']['widget']['settings']['og_hide'] = array(
'#type' => 'checkbox',
'#title' => t('Hide'),
'#description' => t('Hide group field, and apply default values.'),
'#default_value' => $form['#instance']['widget']['settings']['og_hide'],
);
}