Skip to content

Instantly share code, notes, and snippets.

@thomasv314
Created February 2, 2012 21:02
Show Gist options
  • Save thomasv314/1725741 to your computer and use it in GitHub Desktop.
Save thomasv314/1725741 to your computer and use it in GitHub Desktop.
drupal 7 module example
function og_netforum_importer_start($form, &$form_state) {
// here I build the form
return $form;
}
/*
Validate the page by setting a form cache...
*/
function og_netforum_importer_start_validate(&$form, &$form_state) {
// here i write to db
}
/*
Now that we know the form cache is validated we will redirect!
*/
function og_netforum_importer_start_submit($form, &$form_state) {
// here i redirect to next portion of setup ...
drupal_goto("admin/config/og_netforum/wizard/setup", array(), 302);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment