Skip to content

Instantly share code, notes, and snippets.

@glennpratt
Created July 30, 2010 20:48
Show Gist options
  • Save glennpratt/501294 to your computer and use it in GitHub Desktop.
Save glennpratt/501294 to your computer and use it in GitHub Desktop.
<?php
//module_load_include('inc', 'user', 'user.pages');
//$form_id = 'user_register';
module_load_include('inc', 'node', 'node.pages');
$form_id = 'group_node_form';
$form_state = array();
$args = array($form_id, $form_state);
// Make sure $form_state is passed around by reference.
$args[1] = &$form_state;
$form = call_user_func_array('drupal_retrieve_form', $args);
$form['#post'] = $form_state['values'];
drupal_prepare_form($form_id, $form, $form_state);
dpm($form);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment