diff --git a/captcha.module b/captcha.module index 6b36605e045676e22cd4984c6a442ea38bd10f82..e7996ff4b09ba1a0cd4fc8b32fe82c8ccf836ce8 100644 --- a/captcha.module +++ b/captcha.module @@ -269,6 +269,9 @@ function captcha_process($element, $edit, &$form_state, $complete_form) { // Store the solution in the #captcha_info array. $element['#captcha_info']['solution'] = $captcha['solution']; + // Make sure we can use a top level form value $form_state['values']['captcha_response'], even if the form has #tree=true. + $element['#tree'] = FALSE; + } return $element;