--- textimage.module Thu Aug 24 18:02:48 2006 +++ textimage.module Tue Oct 31 12:35:56 2006 @@ -229,7 +229,10 @@ } function textimage_captchachallenge(&$form) { - $form['captcha_response'] = array ( + $newform = array(); + foreach ($form as $name => $element) { + if ($element['#type'] == 'submit'){ + $newform['captcha_response'] = array ( '#type' => 'textfield', '#title' => t('Captcha Validation'), '#default_value' => '', @@ -238,7 +241,10 @@ '#description' => t('Please type in the letters/numbers that are shown in the image above.'), '#prefix' => '
'.t('Captcha Image: you will need to recognize the text in it.').'
', ); - + } + $newform[$name] = $form[$name]; + } + $form = $newform; return $form; }