Return to Snippet

Revision: 28452
at July 8, 2010 17:13 by redhatmatt


Initial Code
<?php
function qctpmm_form_alter(&$form, $form_state, $form_id) {
switch ($form['#id']) {
case 'node-form':
if ($form['type']['#value'] == 'page') {
$form['#redirect'] = 'user';
}
break;
}
}
?>

Initial URL

                                

Initial Description
on node/add/save redirect your to a url of your choice in Drupal 6 in your own custom module.  (in this my module name is qctpmm, it's simply the content type of page and it's redirecting to user.)

Initial Title
node add, save redirect to url

Initial Tags
url, redirect

Initial Language
PHP