Drupal – Redirect after Form Submission @ 1

Use the hook_form_alter() for redirection after form submission.

function <module>_form_alter(&amp;$form, $form_state, $form_id) {
  switch ($form_id) {
    case 'your_form_id':
        $form['#redirect'] = 'node/1';
      break;
  }
}

 

Please note that if you have set the $form_state[‘storage’], the above redirection will not work.

Done =)

Reference: Drupal Docs – Redirecting Users After Submitting a Form in Drupal 5 and 6

One thought on “Drupal – Redirect after Form Submission @ 1”

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.