function oa_core_form_oa_space_node_form_alter in Open Atrium Core 7.2
Implements hook_form_FORM_ID_alter().
File
- ./
oa_core.module, line 1673
Code
function oa_core_form_oa_space_node_form_alter(&$form, &$form_state, &$form_id) {
// If we are on the node add form that is specific to this Space Blueprint, we
// take the 'Space Blueprint' from the URL and hide the field.
if (arg(0) == 'node' && arg(1) == 'add' && arg(2) == 'oa-space' && ($space_tid = arg(3)) && !empty($space_tid)) {
$form['field_oa_space_type']['und']['#default_value'] = array(
$space_tid,
);
$form['field_oa_space_type']['#access'] = FALSE;
}
_oa_core_hide_comment_settings($form);
_oa_core_setup_node_space_type($form);
}