node add, save redirect to url


/ Published in: PHP
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments


You need to login to view comments.