Posted By

redhatmatt on 07/08/10


Tagged

url redirect node save add


Versions (?)

node add, save redirect to url


 / Published in: PHP
 

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.)

  1. <?php
  2. function qctpmm_form_alter(&$form, $form_state, $form_id) {
  3. switch ($form['#id']) {
  4. case 'node-form':
  5. if ($form['type']['#value'] == 'page') {
  6. $form['#redirect'] = 'user';
  7. }
  8. break;
  9. }
  10. }
  11. ?>

Report this snippet  

You need to login to post a comment.