function ggroup_form_group_form_alter in Group 7
Implements hook_form_BASE_FORM_ID_alter().
File
- modules/
ggroup/ forms/ ggroup.inc, line 30 - Subgroup creation form.
Code
function ggroup_form_group_form_alter($form, &$form_state) {
$subgroup = $form_state['group'];
// If the group is a subgroup, add some magic.
if (!empty($subgroup->group)) {
$group = group_load($subgroup->group);
$group_type = group_type_load($subgroup->type);
$message = 'Create @group_type in @group';
$replace = array(
'@group_type' => $group_type
->label(),
'@group' => $group
->label(),
);
drupal_set_title(t($message, $replace), PASS_THROUGH);
}
}