Explicitly Render MTCaptcha

MTCaptcha widget will automatically render on load as default behavior.  To explicitly control when the widget is rendered.

Use the ‘render’ and ‘renderQueue’ javascript config params.  

<script>
  var mtcaptchaConfig = {
      "sitekey": "<YOUR SITE KEY>",
      "render": "explicit",     // or "auto"
      "renderQueue": []
   }
   ...
</script>
...
<div id="someMTCaptchaID"></div>

...
<script>
   //Explict MTCaptcha (async) call 
   to initialize and render captcha widget 
   mtcaptchaConfig.renderQueue.push("someMTCaptchaID");
</script>

Asynchronous JavaScript Load

The explicit render call via the config queue push() is async safe,

mtcaptchaConfig.renderQueue.push("")

The captcha widget will render as soon as possible after the queue push, whether the MTCaptcha javascript library has loaded or not at the time of invocation.

Timing of Target DIV in DOM

The MTCaptcha will only look for the target DIV (with id=’<targetDivID>’) after call of

mtcaptchaConfig.renderQueue.push().