Hello everybody,

I encounter a problem with the positioning of the captcha on the account creation form (image captcha module).

I have been browsing drupal forums for 2 days and despite some track, I can not solve my problem.

I have try to create a hook module like this but it dosn't works. The captcha bloc never positions itself properly.
 

<?php
/*
 * Implementation of hook_form_alter()
 */

function custom_hook_form_alter(&$form, &$form_state,$form_id) {
        if($form['#form_id'] == 'user_register_form') {
                        $form['my_captcha_element'] = array(
                                '#type' => 'captcha',
                                '#captcha_type' => 'image_captcha/Image',
                                '#weight' => 4,
                                );
                        $form['account']['name']['#weight'] = 1;
                        $form['account']['mail']['#weight'] = 2;
                        $form['account']['pass']['#weight'] = 3;
                        $form['actions']['#weight'] = 5;
}
}
?>

The screenshoot with "OneDrive" : https://1drv.ms/i/s!At-BBzEwvOh0kyV_57VLD7VA8xct

Can anybody help me ?

Thank you in advance and sorry for my bad english.