I can send the form with or without the box checked. No idea where to go here.
I have a "custom" form that accepts email addresses.
An earlier uploaded .csv
file is checked for that specific email address and sends the email address and set of data corresponding with that email address in the .csv
file.
This all works but I need to add a reCaptcha function. So I wanted to use Googles.
Here is the code (without the check and mail function). The basic form
<form action="" method="post" enctype="multipart/form-data">
<input type="text" name="field_name" />
<div class="g-recaptcha" data-sitekey="6LcYnikUAAAAAMUyMmPRUlnnF-1i3pShj52unsn5"></div>
<input type="submit" value="Versturen" />
</form>
The header contains:
<script src='https://www.google.com/recaptcha/api.js'></script>
Further info:
- The php
that handles the email and file check is added after the form (also tried before the form but no difference)
- I get warnings saying it can't include wp-load.php
but if I send the form it will send and deliver.
Warning: include(../../../wp-load.php): failed to open stream: File or folder doesn't exist in /home/xxx/wp-content/themes/xxx/template.php on line 39
Warning: include(../../../wp-load.php): failed to open stream: File or folder doesn't exist in /home/xxx/wp-content/themes/xxx/template.php on line 39
Warning: include(): Failed opening '../../../wp-load.php' for inclusion (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/xxx/wp-content/themes/xxx/template.php on line 39
Line 39:
include '../../../wp-load.php';
Any idea why the reCaptcha won't work?