A
A
ALexjok1002017-05-05 19:37:20
reCAPTCHA
ALexjok100, 2017-05-05 19:37:20

Can't set up Invisible Recaptcha?

Hello, I've already broken my head, I read the instructions on your site, but I just can't set up Invisible Recaptcha. I have a one page website with a callback form. The form submission comes from index1.php
Initially, the form submit button looked like this:

<div class="h1">Оставьте заявку прямо сейчас</div>
                    <div class="form" id="form">
                    <form action="index1.php" method="post">
                        <input type="text" name="name" class="form-text necessality" placeholder="Ваше имя">
                        <input type="text" name="email" class="form-text necessality" placeholder="Ваш email">
                        <input type="text" name="phone" class="form-text necessality" placeholder="Ваш телефон">
                        <button class="form-button">Отправить</button>
                    </form>
                    </div>

I added to the site:
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<script>
function onSubmit(token) {
  document.getElementById("index1.php").submit();
}
</script>

And changed the button:
<div class="h1">Оставьте заявку прямо сейчас</div>
                    <div class="form" id="form">
                    <form action="index1.php" method="post">
                        <input type="text" name="name" class="form-text necessality" placeholder="Ваше имя">
                        <input type="text" name="email" class="form-text necessality" placeholder="Ваш email">
                        <input type="text" name="phone" class="form-text necessality" placeholder="Ваш телефон">
                        <button class="g-recaptcha" data-sitekey="6LcVlBwUAAAAAC-gI9Ll1D7RD3-AFaapoNB4RVnU" data-callback="OnSubmit">Отправить</button>
                    </form>
                    </div>

What to do next? The Recaptcha logo appeared in the corner. But after clicking the "Send" button, I get a window with the passage of Recaptcha and nothing else. That is, it does not go to the index1.php form.
I read that you need to check the key, how to do it and where to register it ???

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question