Closed (fixed)
Project:
CAPTCHA
Version:
7.x-1.3
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Oct 2008 at 16:50 UTC
Updated:
3 Jun 2018 at 01:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
CarbonPig commentedSame Question.
Comment #2
Moonshine commentedMost likely you have some some form elements that weight "less" and some that way "more" so captcha is rendered between them. You can either reorder the weights of your cck fields so they are all lighter then the captcha, or change the weight of the captcha element with hook_form_alter().
Comment #3
CarbonPig commentedHow exactly would I "change the weight of the captcha element with hook_form_alter()"
I'm still a novice at all of this, so if you, or someone else has time, I would appreciate a detailed description of what exactly to I should do. There has been a lot of people on the forums wondering about this, so any time you have would be appreciated.
Thanks,
The Carbon Pig
Comment #4
Moonshine commentedHowdy...
What I was suggesting would involve placing some php code in a custom module that you would create for making changes to your site. Not sure if that's something you're comfortable with or not.
I took a quick look at the Captcha code and it does look like there are some key differences re: placement with the Drupal 5 version vs. the Drupal 6 version. What version of Drupal are you using?
For example in the Drupal 6 version there is a pre_render function in place for the sole purpose of placing the Captcha right before the first form button it finds:
So perhaps you have another field in the form offering up a button that's making captcha want to place it there. Really if that's the case, the Captcha should probably offer some other weighting options as fields like imagefield have their own buttons as do multivalue cck fields in general.
Either way, it can be adjusted via some code, but that does depend on what version of Drupal you're using.
Edit: Actually in looking at the D6 code more, it should get placed right before the actual submit "button"s, so I don't think field buttons should affect it.
Comment #5
PRZ commentedI had this same problem with Drupal 6.6 and corrected by changing the field weights in my CCK form. At first I couldn't do this as I only had the Javascript Drag Cross Bars. After turning off Javascript in my browser (Safari) I could manually change the weight of each field.
I found I had to have all fields with a weight of less than 0 (i.e., -9 through -1) for the CAPTCHA to be placed as the last element on my CCK form when displayed for the user. Any weights of 0 or more were placed after the CAPTCHA element on the form.
Paul.
Comment #6
jordan.schmitt commentedPaul
Thanks for the tip. I did the same thing and it worked perfectly.
Comment #7
scott859 commentedPaul
Thanks also - I was having the same issue and this solved it.
Scott
Comment #8
soxofaan commentedissue #367046: Weight settings UI for CAPTCHAs should tackle this problem (patch is in the making), so I set this as a duplicate
Comment #9
quinti commentedThanks guys
and, in d 6x, disabling de js, we can put the exact order,
the captcha have a weight of 1, then, putting all the fields in negative is done,
thanks
Comment #10
robertdjung commentedanother way to do this is using the DEVEL module, if you turn on theme developer, it shows the actual weight numbers. for me, anyway!
Comment #11
yenerunver commentedIn D7, if you use Field Collection or Entity Forms etc., you might end up with more than 1 Form Submit Button.
Since Captcha places itself according to the position of Form Actions Area or Form Submit Button, this situation creates a conflict and Captcha places itself above of the first button (this button can be positioned in the middle of the form).
This patch looks for Form Button count and places Captcha above the last button, which is generally the Submit button.
Comment #12
tonylegrone commented#11 worked great for me. Just don't forget to go to
admin/config/people/captchaand clear the placement cache. That threw me off for a minute.Thanks!
Comment #13
MatthijsG commented#11 didn't work for me, even after clearing cache & clearing captcha placement on admin/config/people/captcha. Use some fieldsets and vertical tabs on the add-page.
Comment #14
RKopacz commentedAny developments regarding the patch? Committed in dev?
Comment #15
vikramy commented#11 worked for me.
Comment #16
elachlan commentedComment #19
elachlan commented