summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2012-07-29 23:40:18 -0400
committerDavid Rothstein <drothstein@gmail.com>2012-07-29 23:40:18 -0400
commit7a3d48e2b9b639a3af31e56fc6c52d36bc41812c (patch)
treee8ea9541244afdb6229d7538513d8312da245cd1 /includes
parent55fbef328f95e0a8dfff0a459c0bf9d24601a11a (diff)
downloadbrdo-7a3d48e2b9b639a3af31e56fc6c52d36bc41812c.tar.gz
brdo-7a3d48e2b9b639a3af31e56fc6c52d36bc41812c.tar.bz2
Issue #1659000 by sun: Fixed $form_id is not recorded/provided in $form_state['build_info'].
Diffstat (limited to 'includes')
-rw-r--r--includes/form.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/form.inc b/includes/form.inc
index 7d5a28c6e..b4264f193 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -164,6 +164,8 @@ function drupal_get_form($form_id) {
* automatically loaded by form_get_cache(). By default the current menu
* router item's 'file' definition is added, if any. Use
* form_load_include() to add include files from a form constructor.
+ * - form_id: Identification of the primary form being constructed and
+ * processed.
* - base_form_id: Identification for a base form, as declared in a
* hook_forms() implementation.
* - rebuild_info: Internal. Similar to 'build_info', but pertaining to
@@ -721,6 +723,9 @@ function drupal_form_submit($form_id, &$form_state) {
function drupal_retrieve_form($form_id, &$form_state) {
$forms = &drupal_static(__FUNCTION__);
+ // Record the $form_id.
+ $form_state['build_info']['form_id'] = $form_id;
+
// Record the filepath of the include file containing the original form, so
// the form builder callbacks can be loaded when the form is being rebuilt
// from cache on a different path (such as 'system/ajax'). See