Prerequisites to integrate AEM Forms environment with hCaptcha®
To configure hCaptcha® with AEM Forms, you need to obtain the hCaptcha® site key and secret key from the hCaptcha® website.
Configure hCaptcha®
To integrate AEM Forms with hCaptcha® service, perform the following steps:
-
Create a Configuration Container on your AEM Forms environment, which holds Cloud Configurations used to connect AEM to external services. To create a Configuration Container:
-
Open your AEM Forms environment.
-
Go to Tools > General > Configuration Browser.
-
In the Configuration Browser, you can select an existing folder or create a new folder:
-
To create a new folder and enable the Cloud Configurations:
- In the Configuration Browser, click Create.
- In the Create Configuration dialog, specify a name, title, and check Cloud Configurations.
- Click Create.
-
To enable Cloud Configuration for an existing folder:
- In the Configuration Browser, select the folder and select Properties.
- In the Configuration Properties dialog, enable Cloud Configurations.
- Click Save & Close to save the configuration and exit the dialog.
-
-
-
Configure your Cloud Services:
-
On your AEM author instance, go to
-
Select a Configuration Container, created or updated, as described in the previous section. Select Create.
-
Specify Title, Site Key, and Secret Key for hCaptcha® service obtained in Prerequisite.
-
Click Create.
NOTE
Users need not to modify Client-side JavaScript validation URL and Server-side validation URL as they are already prefilled for hCaptcha® validation.Once the hCAPTCHA service is configured, it is available for use in your adaptive form.
-
Use hCaptcha® in an Adaptive Form
-
Open your AEM Forms environment.
-
Go to Forms > Forms and Documents.
-
Select an Adaptive Form and Click Properties.
-
In the Configuration Container, select the Configuration Container that contains the Cloud Configuration that connects AEM Forms with hCaptcha.
-
Click Save & Close.
If you do not have a Configuration Container for hCaptcha, see section Connect your AEM Forms environment with hCaptcha® to learn how to create a Configuration Container.
-
Select an Adaptive Form and Click Edit to open the form in the editor.
-
From the component browser, drag-drop the Captcha component onto the Adaptive Form.
-
Select the Captcha component, and click properties
-
Title: Specify the title for your Captcha component.
-
Validation Message: Provide a validation message for your Captcha validation on form submission or on a user action.
-
Captcha Service: Select the CAPTCHA Service for your form submission, here you select hCaptcha®.
-
Configuration Settings: Select your Cloud Configuration configured for hCaptcha®.
NOTE
You can have multiple Cloud Configurations in your environment for a similar purpose. So, choose the service carefully. If no service is listed, see Connect your AEM Forms environment with hCaptcha® to learn how to create a Cloud Service that connects your AEM Forms environment with hCaptcha® service. -
Error Message: Provide the error message to display to the user when the Captcha submission fails.
-
Captcha Size: You can select the display size of the hCaptcha® challenge dialog. Use the Compact option to display a small sized and the Normal to display a relatively large-size hCaptcha® challenge dialog or Invisible to validate hCaptcha® without explicitly rendering the checkbox widget on the user interface.
-
-
Select Done.
Now, only legitimate forms, in which the form filler successfully clears the challenge posed by the hCaptcha® service are allowed for the form submission.
hCaptcha® is a registered trademark of Intuition Machines, Inc.
Frequently Asked Questions
- Q: Can I use more than one Captcha component in an Adaptive Form?
- Ans: Using more than one Captcha component in an Adaptive Form is not supported. Also, it is not recommended to use a Captcha component in a fragment or a panel marked for lazy loading.