From b78d8ced5c265dd0a290643af2d15221d3a1a8ef Mon Sep 17 00:00:00 2001
From: Bradley M. Froehle <brad.froehle@gmail.com>
Date: Thu, 17 Mar 2011 11:45:38 -0700
Subject: [PATCH] Issue #1096448 - Improve $form_state['redirect'] documentation.

---
 includes/form.inc |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/includes/form.inc b/includes/form.inc
index c0163ca..f300b6f 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -104,8 +104,10 @@
  *   function via $form_state. This is commonly used for wizard-style
  *   multi-step forms, add-more buttons, and the like. For further information
  *   see drupal_build_form().
- * - 'redirect': a URL that will be used to redirect the form on submission.
- *   See drupal_redirect_form() for complete information.
+ * - 'redirect': $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.
  * - 'storage': $form_state['storage'] is not a special key, and no specific
  *   support is provided for it in the Form API, but by tradition it was
  *   the location where application-specific data was stored for communication
@@ -1128,10 +1130,11 @@ function drupal_validate_form($form_id, &$form, &$form_state) {
  * Redirects the user to a URL after a form has been processed.
  *
  * After a form was executed, the data in $form_state controls whether the form
- * is redirected. By default, we redirect to a new destination page. The path of
- * the destination page can be set in $form_state['redirect']. If that is not
- * set, the user is redirected to the current page to display a fresh,
- * unpopulated copy of the form.
+ * is redirected. By default, we redirect to a new destination page. The path
+ * of the destination page can be set in $form_state['redirect'], as either a
+ * string containing the destination or an array of arguments compatible with
+ * drupal_goto(). If that is not set, the user is redirected to the current
+ * page to display a fresh, unpopulated copy of the form.
  *
  * There are several triggers that may prevent a redirection though:
  * - If $form_state['redirect'] is FALSE, a form builder function or form
-- 
1.7.4.1

