I enabled captcha for a new form and initially, it worked correctly. However, when the production database was loaded, the captcha would up being placed BELOW the submit element. This was NOT a CSS issue; the div was actually placed in the wrong order.
I tried taking the submit button out, clearing caches, re-enabling the submit function... nothing worked. When captcha came back back, was always below the submit element in the form array.
The hack: disabled the captcha for the form_id in question (by going to /admin/user/captcha).
Then, hand coded the captcha element into the form by hand (see http://drupal.org/node/743056)
$form['activate_captcha'] = array(
'#type' => 'captcha',
);
Worked. Nonetheless, this is a bug.
Comments
Comment #1
soxofaan commentedI understand it is a custom form, is that correct?
can you provide the form source code?
If you talk about clearing caches, which caches are that? Standard drupal caches? Or the captcha placement cache?
Comment #2
tmwagner commentedWith reference to clearing caches, I cleared both standard Drupal cache and captcha placement cache.
Here is the custom form code (with the hand coded call
Comment #3
soxofaan commentedis it only the CAPTCHA element that is in an undesired place, or are there other things in an other order than in source code?
can you provide a screen shot of the resulting form?
Comment #4
tmwagner commentedIt is only the CAPTCHA element that winds up at the bottom, regardless of where it is placed in the code.
Screen shot attached.
Comment #5
winklet commentedI was having what seemed to be the same problem, but I found an option in the configuration of the CAPTCHA to "flush the CAPTCHA placement cache" and that seemed to do the trick. Hope that helps.
Comment #6
wundo commented