Validate reCAPTCHA

0

Good morning to all, after reviewing a lot of questions in stack I decided to ask a question to see if you can help me!

This is my file index.html More or less

<html>
    <head>      
        <script src="https://www.google.com/recaptcha/api.js"></script>
    </head>
    <body>
    <div class="box">
      <form method="post" action="guardar.php">

        <div class="field half first"><input type="text" name="name" placeholder="Nombre y Apellido" required pattern="[a-zA-ZàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð ,.'-]{2,48}" /></div>

        <div class="field half"><input type="email" name="email" placeholder="Correo"required pattern="^[a-zA-Z0-9.!#$%&’*+/=?^_'{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$" maxlength="155" /></div>

        <div class="field"><textarea name="message" placeholder="Mensaje" rows="6" required maxlength="500"></textarea></div>

          <div class="g-recaptcha" data-sitekey="XXXXXXXXXXXXXXXXXXXXXXXXXXX"></div>

        <ul class="actions">
          <li><input type="submit" value="Enviar Clasificado"/></li>
        </ul>
      </form>

    </div>
    </div>
  </body>
</html>

I have seen several tutorials already and I have not been able to achieve it. It is that if the user does not click on the captcha and press the send classified button, he can not send it and a validation appears that says he must validate the captcha.

How can I achieve this?

    
asked by Lisandro Arnodo 13.05.2017 в 14:48
source

0 answers