Is there a way to resize the recaptcha on the mobile portrait view in Webflow?Can someone explain how to set up the google invisible recaptcha in Webflow?

Published on
September 23, 2023

How to resize the reCAPTCHA on mobile portrait view in Webflow?

To resize the reCAPTCHA on mobile portrait view in Webflow, you can use custom CSS code to adjust its dimensions. Here's how you can do it:

  1. Select the reCAPTCHA element in the Webflow Designer.

  2. In the right sidebar, click on the "Custom Code" tab.

  3. Click on the "</> Custom Code" button to add custom code to the element.

  4. In the code editor, add the following CSS code:

    ```css

    ```

    This code targets screens with a maximum width of 767 pixels, which is the typical breakpoint for mobile portrait view. You can modify the value to fit your specific needs.

  5. Publish your site for the changes to take effect.

By scaling down the reCAPTCHA element using CSS code, you can effectively resize it for mobile portrait view in Webflow.

How to set up the Google Invisible reCAPTCHA in Webflow?

Setting up the Google Invisible reCAPTCHA in Webflow involves a few steps. Here's a step-by-step guide to help you through the process:

  1. Go to the Google reCAPTCHA website (https://www.google.com/recaptcha) and sign in with your Google account.

  2. Click on the "Admin Console" button to create a new reCAPTCHA site.

  3. Fill in the necessary details like label, reCAPTCHA type, and domains.

  4. Accept the terms of service and click on the "Submit" button to create the reCAPTCHA site.

  5. Once the site is created, you'll be provided with a site key and a secret key. Keep these keys handy as you'll need them later.

  6. In your Webflow project, go to the page where you want to add the reCAPTCHA.

  7. Drag and drop an HTML Embed element onto the page where you want the reCAPTCHA to appear.

  8. In the HTML Embed settings panel, click on the "</> Embed Code" button to enter custom code.

  9. In the code editor, add the following HTML code:

    ```html

    \`\`\`

    This code adds a container for the reCAPTCHA element.

  10. Next, add the following JavaScript code to your site's custom code or before the closing </body> tag:

    ```javascript

    ```

    This code will trigger the form submission when the reCAPTCHA is successfully verified.

  11. Finally, add the necessary attribute to the form on your page to trigger the reCAPTCHA verification:

    ```html

    \`\`\`
  12. Replace action="#" with the appropriate form action URL when you're ready to process form submissions.

With these steps, you'll have successfully set up the Google Invisible reCAPTCHA in your Webflow project, helping to protect your forms from spam and abuse.

Additional questions:

  1. How can I style the reCAPTCHA widget in Webflow?
  2. Is Webflow compatible with other form protection solutions?
  3. Can I use reCAPTCHA v3 with Webflow?