Hi all,

I am hooking into the user_register form using form_alter to add some custom fields to the user register form which are being saved in a custom database table.

As part of this process, I have added a validate function to the form like so:

if ($form['#id'] == 'user-register') {

		$form['#validate'][] = 'survey_user_register_validate';
}

The validate hook fires off correctly, but if there are any errors on the form, when the form reloads with the errors output, the captcha does not regenerate and displays an empty fieldset with no captcha image or form field (I am using the captcha and image_captcha modules). Does anyone have any ideas?

Comments

jeebsuk’s picture

Once you've successfully entered the captcha I guess it considers you passed for that session on that form, so the actual problem is just why it outputs an empty fieldset, not nearly such a big problem.