Add CAPTCHA to a Contact Form

To enhance the security of your contact form, you can add a CAPTCHA challenge using a third-party CAPTCHA provider, either hCaptcha or Google reCAPTCHA v2.

CAPTCHA challenges prompt customers to complete simple tasks to verify they are human before submitting the contact form. This adds an extra layer of protection against automated abuse and fraudulent activity and helps prevent bot attacks from creating spam submissions.

Note:

CAPTCHA for a contact form is different than SuiteCommerce CAPTCHA. For more information about setting up CAPTCHA for your SuiteCommerce web store, see SuiteCommerce CAPTCHA.

To set up CAPTCHA for a contact form:

  1. Sign up with the provider of your choice and get a Site Key

    Provider choices:

  2. Create a secret key in NetSuite using API secrets

    For more information, see Creating Secrets.

    In the Restrictions tab:

    • Check the box for Allow for All Scripts

    • For Restrict to Domains, add the corresponding CAPTCHA validation domain:

      • For hCaptcha: api.hcaptcha.com

      • For Google reCaptcha v2: www.google.com

      Note that with this domain restriction, the secret key is only exposed when communicating with the designated CAPTCHA validation service.

  3. Configure CAPTCHA in NetSuite

Configure CAPTCHA in NetSuite

To set up CAPTCHA for the contact form, configure the fields on the SuiteCommerce Configuration record.

CAPTCHA configuration is domain-specific. You can disable CAPTCHAs that are no longer needed.

To configure CAPTCHA

Note:

It may take a little time for the changes to take effect. To see the changes sooner, trigger a Cache Invalidation Request.

  1. Go to Commerce > Websites > Configuration.

  2. Select the website and domain where the Map&Contact extension is activated and click Configure.

  3. Go to the Extensions tab and the Contact Us Form subtab.

  4. Set the following fields:

    Field

    Description

    CAPTCHA Type Option

    Choose your CAPTCHA provider. You can choose between Google reCAPTCHA v2 and hCaptcha.

    To disable this CAPTCHA challenge, select Disabled.

    CAPTCHA Site Key

    Enter the public key provided by your CAPTCHA provider (reCAPTCHA or hCaptcha).

    CAPTCHA Secret Key ID

    Enter the private key's ID.

    For more information about how to create a secret key using API secrets, see Creating Secrets.

  5. Click Save.

General Notices