From 1012247df719153f9593c95686d9c0a2b1128be9 Mon Sep 17 00:00:00 2001
From: Stefaan Lippens <soxofaan@41478.no-reply.drupal.org>
Date: Wed, 16 Mar 2011 21:09:15 +0100
Subject: [PATCH] reworked patch from http://drupal.org/node/1024370#comment-4215086

---
 captcha.module |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/captcha.module b/captcha.module
index 8b4adbd..9128b61 100644
--- a/captcha.module
+++ b/captcha.module
@@ -208,6 +208,8 @@ function captcha_element_process($element, &$form_state, $complete_form) {
   else {
     // Generate a new CAPTCHA session if we could not reuse one from a posted form.
     $captcha_sid = _captcha_generate_captcha_session($this_form_id, CAPTCHA_STATUS_UNSOLVED);
+    // Set $posted_form_id during the first rendering of the form.
+    $posted_form_id = $this_form_id;
   }
 
   // Store CAPTCHA session ID as hidden field.
-- 
1.7.3.4

