# Problem with reCAPTCHA

**URL:** <https://forum.wixstudio.com/t/problem-with-recaptcha/9261>\
**Category:** Ask the community\
**Tags:** wix-restaurants, question, code\
**Created:** [March 8, 2021, 5:14am UTC](https://forum.wixstudio.com/t/problem-with-recaptcha/9261 "2021-03-08T05:14:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexobc](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/alexobc/32/26207_2.png) [@alexobc](https://forum.wixstudio.com/u/alexobc)\
**Post date:** [March 8, 2021, 5:14am UTC](https://forum.wixstudio.com/t/problem-with-recaptcha/9261/1 "2021-03-08T05:14:12Z")

</div>

Hi,  
Recently I have tried to implement a captcha onto a form. However, when I load the page in preview mode, I get this error:

![](https://us1.discourse-cdn.com/wix/original/3X/d/f/df3abc32af8b4817dac1e075c57880c7f0f8fe26.jpeg)  
Here is my code:

```javascript
  $w.onReady(function () {

      $w("#captcha").onVerified(() => {
      $w("#messageText").hide();
      $w("#submitButton").enable();
  })

  $w("#submitButton").onClick(() => {
 let submitRequestData = {
 "token": $w("#captcha").token,
 "review": $w("#textBox1").value,
 "starRating": $w("#text136").text,
 "restaurantName": $w("#text151").text,
 "personName": $w("#input1").value
      }
          processSubmission(submitRequestData)
      .then( () => {
        $w("#captcha").reset();
        $w("#submitButton").disable();
        $w("#messageText").text = "Review successfully submitted!";
        $w("#messageText").show();
      })
      .catch( () => {
        $w("#captcha").reset();
        $w("#submitButton").disable();
        $w("#messageText").text = "Something went wrong. Please redo the captcha challenge.";
        $w("#messageText").show();
      })
  })
 
  $w("#captcha").onError(() => {
    $w("#messageText").text = "The reCAPTCHA element lost connection with the CAPTCHA provider. Please try again later.";
    $w("#messageText").show()
    .then(() => {
      $w("#messageText").hide("fade", {"delay": 10000});
    } );
  })

    $w("#captcha").onTimeout(() => {
    $w("#submitButton").disable();
  })
});

```

I have no errors in the editor.

At the top I have included

```javascript
import wixCaptchaBackend from 'wix-captcha-backend';
import {processSubmission} from 'backend/submitHandler';

```

In the backend code file I have

```javascript
import wixCaptcha from 'wix-captcha-backend';
import wixData from 'wix-data';

export function processSubmission(submitRequestData) {
 return wixCaptcha.authorize(submitRequestData.token)
    .then(() => {
 return wixData.insert("PendingReviews", submitRequestData.data);
  });
}

```

There are no errors in that either

I am completely stumped, can anyone help?
