When using custom code instead of the built-in reCAPTCHA Webflow component, you will need to enter the secret key in your server-side code rather than within Webflow itself.
Here is a general overview of the process:
1. Generate reCAPTCHA API keys: First, you need to generate the necessary API keys for reCAPTCHA. You can do this by visiting the reCAPTCHA website (https://www.google.com/recaptcha) and signing up with your Google account. Once you have signed in, you can create a new reCAPTCHA site by providing a label and selecting the reCAPTCHA type (reCAPTCHA v2 or reCAPTCHA v3).
2. Obtain the secret key: After creating your reCAPTCHA site, you will be provided with a site key and a secret key. The site key is used on the client-side, while the secret key is used for server-side verification.
3. Implement reCAPTCHA in your custom code: In your website's custom code, you will need to integrate reCAPTCHA into your form validation process. This typically involves adding the necessary code to your form's submission handler on the server side.
Here's a general example of how you can implement reCAPTCHA verification using a popular server-side language like PHP:
```php
");curl\_setopt($ch, CURLOPT\_POST, true);curl\_setopt($ch, CURLOPT\_POSTFIELDS, http\_build\_query([ 'secret' => 'YOUR\_SECRET\_KEY\_HERE', 'response' => $recaptchaResponse]));curl\_setopt($ch, CURLOPT\_RETURNTRANSFER, true);$recaptchaResult = json\_decode(curl\_exec($ch), true);curl\_close($ch);// Check if the reCAPTCHA response is validif ($recaptchaResult['success']) { // Your code to process the form submission here echo "reCAPTCHA verification success!";} else { // Handle reCAPTCHA verification failure echo "reCAPTCHA verification failed!";}?>```
In the above example, replace `'YOUR_SECRET_KEY_HERE'` with your actual secret key obtained from the reCAPTCHA site.
Remember, this is just a general example, and the implementation may vary depending on your server-side technology and specific requirements. Make sure to consult the documentation and resources specific to your chosen programming language or framework for proper integration.