user2099037
user2099037

Reputation: 59

Recaptcha.reload() resets the focus of my form to the captcha. Need to disable

When my form fails validation, it executes this block of js:

Recaptcha.reload("t");

$(document).scrollTop( ScrollY.top - 10 );
$(firsterror).focus();

From what I've read at the google forums, the 't' parameter should disable the focus on the captcha, but it seems to have no effect.

I don't want it to focus on the recpatcha, as I have other fields further up the page that have also failed validation.

Upvotes: 1

Views: 1874

Answers (1)

MacMac
MacMac

Reputation: 35331

You could use the internal reload function that Recaptcha uses, like so:

Recaptcha.reload_internal('t');

This will stop Recaptcha from focusing the field after any invalidity.

Upvotes: 3

Related Questions