Position of captcha from usability point of view.

lomoboy - May 4, 2007 - 22:27
Project:CAPTCHA
Version:5.x-1.x-dev
Component:User interface
Category:feature request
Priority:critical
Assigned:Unassigned
Status:closed
Description

I've done a little research about usage of captcha in well-known web sites like Google, Yahoo and others. In most cases captcha is placed above the submit button or textarea. And this position also seems to be right for me. This is why I decided to make an improvement of captacha module.

I've already seen previous posts about captcha's position:
http://drupal.org/node/60874
http://drupal.org/node/103941

But patches and ideas there look strange for me. While I investigating the issue I've found that Drupal's forms haven't strict order(read: proper weight) and some forms like contact forms in generally hasn't weight field. So we couldn't add weight support to any field because we haven't standard of field's weight in Drupal. For example we could recommend to developers always to use weight=30 for submit button and weight=20 for textarea. It will allows to use such strict order in modules which push additional fields in Drupal's form.

Here I've posted very clear and simple patch which allows always to use the captcha filed above the submit button. I just get the weight of submit filed and decrease it by 1 for captcha's filed. And if the weight of submit field is absent when I create it with value 30.

AttachmentSize
captcha_8.patch806 bytes

#1

charly - May 8, 2007 - 16:59

Thanks!

note: These changes can be made to textimage/captcha.inc for image captcha.

Regards,

#2

lomoboy - May 13, 2007 - 10:16

yes, but i usually use text captcha.

#3

archetwist - June 5, 2007 - 19:32

Thanks for the patch. It does not work as intended when the comment preview option is enabled though. Here is my modified version:

  if ($form['preview']['#weight']) {
    $captcha_weight = $form['preview']['#weight'] -1;
  }
  elseif ($form['submit']['#weight']) {
    $captcha_weight = $form['submit']['#weight'] -1;
  }
  else {
    $form['submit']['#weight'] = 100;
    $captcha_weight = 99;
  }

#4

Rob Loach - June 11, 2007 - 22:12

How To RePosition Captcha is a duplicate issue. I submitted a patch to it that allows you to change the weight of the Captcha form that's presented in any form.

#5

wundo - August 17, 2007 - 21:09
Status:patch (reviewed & tested by the community)» duplicate

#6

archetwist - June 25, 2008 - 23:56
Status:duplicate» closed
 
 

Drupal is a registered trademark of Dries Buytaert.