Skip to content

Instantly share code, notes, and snippets.

@allgood2386
Created July 17, 2014 18:53
Show Gist options
  • Save allgood2386/76af49dd52de0abb1319 to your computer and use it in GitHub Desktop.
Save allgood2386/76af49dd52de0abb1319 to your computer and use it in GitHub Desktop.
<?php
/**
* Implements hook_form_alter().
* todo: change weight to something dynamic. IF we reorder anything it will be out of place.
*/
function add_teach_embed_form_alter(&$form, &$form_state, $form_id) {
if ($form_id === 'school_node_form') {
$form['add_teacher'] = array(
'#type' => 'fieldset',
'#title' => t('Add Teachers'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#weight' => '12',
);
$form['add_teacher']['add_teacher_form'] = drupal_get_form('add_teach_embed_form');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment