Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a hook to use after a node of a specific content type is created or saved, to perform a redirection to a specific page.

share|improve this question
up vote 4 down vote accepted

In case of Drupal 6 hook_nodeapi() will help to perform on various actions, basing on the value of the first argument passed to the hook ($op).

  • alter
  • delete
  • load
  • update

In Drupal 7 there is a number of hooks for this.

share|improve this answer

Form redirect after node save. This blog discusses the usually way of redirecting a form, the problem with node forms, and how to solve them for Drupal 6. I believe it should also work for Drupal 7

share|improve this answer

For the completeness of this thread, here is a link to a more detailed answer.
Either code it or add a rule using the rules module.

share|improve this answer

If "created" and "saved" mean node has been on database, here some option.

 * Implements hook_form_NODE_TYPE_node_form_alter()
 * Add some action to submit button
function CUSTOM_MODULE_form_NODE_TYPE_node_form_alter(&$form, &$form_state){
    $form['actions']['submit']['#submit'][] = 'CUSTOM_MODULE_form_NODE_TYPE_node_form_submit';
function CUSTOM_MODULE_form_NODE_TYPE_node_form_submit(&$form, &$form_state){
    $node = $form_state['node'];

Here similar case which can be done by this option.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.