Does $form_state['redirect'] require a rebuild? I'm working on a multi-step form, and one of the last steps is a confirmation page with a 'Continue' and 'Cancel' button. If they hit cancel, I want it to go to a whole other page. 

I have a custom submit handler for the cancel button, but the functionality doesn't appear to be working. I have:

function hook_form_cancel_submit($form, &amp;form_state) {
  drupal_set_message('Cancelled');
  unset($form_state['rebuild']);
  $form_state['redirect'] = array('another/page');
}


I don't want the form to be rebuilt after cancellation, but then I wonder how my redirect would get triggered, since it exists only in $form_state?
Form generation reports the following text:


  $form_state['redirect'] is used to redirect the form on submission. It may either be a string containing the destination URL, or an array of arguments compatible with drupal_goto(). See drupal_redirect_form() for complete information.


The function drupal_redirect_form() is called by drupal_process_form(), which calls it after executing the form submission handlers with form_execute_handlers().

if ($form_state['submitted'] &amp;&amp; !form_get_errors() &amp;&amp; !$form_state['rebuild']) {
  // Execute form submit handlers.
  form_execute_handlers('submit', $form, $form_state);

  // ...

  // If batches were set in the submit handlers, we process them now,
  // possibly ending execution. We make sure we do not react to the batch
  // that is already being processed (if a batch operation performs a
  // drupal_form_submit).
  if ($batch = &amp; batch_get() &amp;&amp; !isset($batch['current_set'])) {
    // ...
  }

  // Set a flag to indicate the the form has been processed and executed.
  $form_state['executed'] = TRUE;

  // Redirect the form based on values in $form_state.
  drupal_redirect_form($form_state);

  // ...
}


In short, the form is not rebuild, before redirecting the user to a new page. The $form_state array that is passed to drupal_redirect_form() is the same array passed to form_execute_handler() (the difference is that the form handlers can add or alter values contained in $form_state).