How to implement on VanillaJS

Add an empty div element where you want to display your Lemin Captcha. If you set a div-id for your Lemin Captcha in the advanced settings, this div must have that same div-id.

Lemin Captcha must be placed inside of a “form” element.

<div id="lemin-cropped-captcha"></div>

After you place your empty div element, paste the JavaScript code you copied in the previous step just below the div element. This div and script elements can be placed just above your “Submit” or “Login” buttons.

JavaScript code must be outside of the “div” element, do not paste the code inside the “div” element.

<div id="lemin-cropped-captcha"></div>
<script src="..."></script>

Please ensure that your container-id is the same as the container-id you've set before. (default: "lemin-cropped-captcha")

It is also possible to add your Lemin Captcha programmatically:

const captchaContainer = document.getElementById('lemin-cropped-captcha');
const leminScript = document.createElement('script');
leminScript.setAttribute('src', `...`);

Please, find below the example GitHub repository.