Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* @file formgrouper.module
* TODO: Enter file description here.
*/
/**
* Implements hook_form_alter().
*/
function formgrouper_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'article_node_form') {
$form['formgrouper'] = array(
'#type' => 'fieldset',
'#title' => t('Form Grouper'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['formgrouper'][] = $form['title'];
unset($form['title']);
$form['formgrouper'][] = $form['body'];
unset($form['body']);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment