# Aangepaste reCAPTCHA Pagina Handleiding

## Vereisten

{% hint style="warning" %}
Zorg ervoor dat Netacea CAPTCHA voor uw account heeft geconfigureerd en ingeschakeld. Zorg er ook voor dat de standaard CAPTCHA-pagina is getest en kan worden weergegeven voordat u een aangepaste CAPTCHA-pagina implementeert.
{% endhint %}

Mits aan bovenstaande vereisten is voldaan, kan een aangepaste CAPTCHA-pagina worden gemaakt door het volgende te doen:

## HTML-pagina

Om een HTML-pagina te maken die wordt gebruikt voor het weergeven van CAPTCHA, kan het nuttig zijn om te beginnen met de Netacea Template HTML voordat u de aangepaste HTML-code toevoegt. De [sjabloonpagina](#netacea-captcha-template) is onderaan dit document te zien.\
\
Uw aangepaste HTML-pagina kan worden ontworpen volgens uw specifieke vereisten en/of bedrijfshuisstijl, maar de pagina moet de volgende code bevatten.\
\
**De volgende scripts moeten binnen het document head-element staan (`<head>...</head>`):**

```html
<link rel="stylesheet" href="https://assets.ntcacdn.net/Mitigations/captcha-1.0.0.css">
<script src="https://www.recaptcha.net/recaptcha/api.js" async defer></script>
```

**Voeg daarnaast de volgende code ergens binnen de body toe (`<body>...</body>`):**

```html
<form id="frmCaptcha" action="" method="POST">
    <div class="g-recaptcha" data-sitekey="{{CAPTCHA_SITE_KEY}}" data-callback="showButton"></div>
    <br />
    <input type="submit" value="Submit" class="btn btnHidden">
    <input type="hidden" maxlength="40" id="hitid" name="hitid" value="{{TRACKING_ID}}">
</form>
```

**De onderstaande scripts moeten ook aan het einde van, maar nog steeds binnen de body worden toegevoegd (`<body>...</body>`):**

```html
<script src="https://assets.ntcacdn.net/Mitigations/fetch-polyfill-3.6.2.js"></script>
<script src="https://assets.ntcacdn.net/Mitigations/submit-captcha-2.0.2.js"></script>
```

{% hint style="warning" %}
Let op: bepaalde links binnen de CAPTCHA-pagina werken mogelijk niet als ze worden gehost achter de site die wordt beschermd door Netacea.
{% endhint %}

### Netacea CAPTCHA-sjabloon

```html
<!DOCTYPE html>
<html lang="en">
<head runat="server">
    <meta name="viewport" content="initial-scale=1.0, width=device-width, maximum-scale=1.0" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title>Captcha Page</title>
    <link rel="stylesheet" href="https://assets.ntcacdn.net/Mitigations/captcha-1.1.1.css">
    <script src="https://www.recaptcha.net/recaptcha/api.js" async defer></script>
</head>
<body>
    <div class="wrapper">
        <header>
            <!-- header content -->
            <h1>Help us verify real visitors</h1>
            <!-- End of header  content -->
        </header>
        
        <!-- statement content -->
        <p>Please complete to continue</p>
        <!-- End of statement content -->

        <!-- Captcha Form, Do not change-->
            <form id="frmCaptcha" action="" method="POST">
                <div class="g-recaptcha" data-sitekey="{{CAPTCHA_SITE_KEY}}" data-callback="showButton"></div>
                <br />
                <input type="submit" value="Submit" class="btn btnHidden">
                <input type="hidden" maxlength="40" id="hitid" name="hitid" value="{{TRACKING_ID}}">
            </form>
        <!-- End of captcha form -->

        <div class="wrapper-values"></div>
    </div>
    <!-- The following two scripts MUST be at the end of the body -->
    <script src="https://assets.ntcacdn.net/Mitigations/fetch-polyfill-3.6.2.js"></script>
    <script src="https://assets.ntcacdn.net/Mitigations/submit-captcha-2.3.0.js"></script>
    <!-- End of scripts at the end of body -->
</body>
</html>
```

*Zodra de aangepaste CAPTCHA-pagina is voltooid, dient u de voltooide CAPTCHA HTML-pagina aan Netacea te verstrekken. Deze wordt geüpload naar onze servers en de nieuwe pagina zal worden gebruikt voor alle CAPTCHA-pagina's die worden weergegeven door de Netacea Bot Management-oplossing.*

### Automatisch invullen van Captcha

Netacea biedt ook een reCAPTCHA-paginasjabloon waarbij de captcha-uitdaging automatisch wordt voltooid zodra de uitdaging door de gebruiker is afgerond. Als u deze oplossing wilt gebruiken, gebruik dan onderstaand sjabloon

```html
<!DOCTYPE html>
<html lang="en">
<head runat="server">
    <meta name="viewport" content="initial-scale=1.0, width=device-width, maximum-scale=1.0" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title>Auto-submit reCaptcha Custom Page</title>
    <link rel="stylesheet" href="https://assets.ntcacdn-uat.net/Mitigations/captcha-1.1.1.css">
    <script src="https://assets.ntcacdn-uat.net/Mitigations/fetch-polyfill-3.6.2.js"></script>
    <script src="https://www.recaptcha.net/recaptcha/api.js" async defer></script>
    <script src="https://assets.ntcacdn-uat.net/Mitigations/submit-captcha-2.3.0.js" async defer></script>
</head>
<body>
    <div class="wrapper">
        <header>
            <!-- header content -->
            <h1>Help us verify real visitors</h1>
            <!-- End of header  content -->
        </header>
        
        <!-- statement content -->
        <p>Please complete to continue</p>
        <!-- End of statement content -->

        <!-- Captcha Form, Do not change-->
        <form id="frmCaptcha" action="" method="POST" data-auto-submit>
            <div class="g-recaptcha" data-sitekey="{{CAPTCHA_SITE_KEY}}" data-callback="frmCaptchaCallback"></div><br /><input
                type="submit" value="Submit" class="btn btnHidden"><input type="hidden" maxlength="40" id="hitid"
                name="hitid" value="{{TRACKING_ID}}">
        </form>
    </div>
</body>
</html>
```
