Skip to content

Instantly share code, notes, and snippets.

@barraponto
Created March 19, 2014 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barraponto/9651054 to your computer and use it in GitHub Desktop.
Save barraponto/9651054 to your computer and use it in GitHub Desktop.
<?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