UndefinedOffset/silverstripe-nocaptcha — pull request #4 by DarrenInwood (2014-12-16 09:27:39+00:00)
Title: Ensure JS is run in the correct order for all browsers.

On IE9, the JS is run in the wrong order on incorrect submissions via User Defined Forms, resulting in the NoCaptcha not appearing in this situation.

To replicate:
1. Load a User Defined Form with a Spam Protection Field, with NoCaptcha set as the spam protector, in IE9.
2. Fill in all other fields but leave the NoCaptcha blank. Submit the form.

Current behaviour:
The Google script file is loaded and run, then the NocaptchaField.js script is processed. The noCaptchaFieldRender function has not yet been defined, so the callback is not called by the Google file.

Expected behaviour:
The Google script is always run after the NocaptchaField.js script. The noCaptchaFieldRender function is always defined, and the NoCaptcha is displayed.

This may also be an issue with other ways of using NoCaptcha, this pull request is a quick solution to my immediate issue. There will be a better way of finding the NoCaptcha instances on the page and running grecaptcha.render on each of them.