From ef6deb6c9a790bc19b9387f2dd2bad658adb5ad9 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 3 Jul 2007 19:13:49 +0000 Subject: [PATCH] - Patch #154299 by Eaton: button details are lost. --- includes/form.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/form.inc b/includes/form.inc index b15e8ed157f..82261eb6c8c 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -762,6 +762,9 @@ function form_builder($form_id, $form, &$form_state) { // Internet Explorer button-click scenario. _form_builder_ie_cleanup($form, $form_state); + // After handling the special IE case, we no longer need the buttons collection. + unset($form_state['buttons']); + return $form; } @@ -877,6 +880,7 @@ function _form_builder_handle_input_element($form_id, &$form, &$form_state) { // the global variables. In this special case, we want to make sure that // the value of this element is listed in $form_variables under 'op'. $form_state['values'][$form['#name']] = $form['#value']; + $form_state['clicked_button'] = $form; if (isset($form['#validate'])) { $form_state['validate_handlers'] = $form['#validate']; @@ -913,9 +917,8 @@ function _form_builder_ie_cleanup($form, &$form_state) { $form_state['submit_handlers'] = empty($button['#submit']) ? NULL : $button['#submit']; $form_state['validate_handlers'] = empty($button['#validate']) ? NULL : $button['#validate']; $form_state['values'][$button['#name']] = $button['#value']; + $form_state['clicked_button'] = $button; } - // After handling the special IE case, we no longer need the buttons collection. - unset($form_state['buttons']); } }