adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
747 stars 753 forks source link

[Form] Captcha Component #1157

Open ky940819 opened 4 years ago

ky940819 commented 4 years ago

Feature Request

A Captcha form component should be added to help prevent bots/spamming. Although there is (currently) no server-side validation for forms, a Captcha would go a long way to at least preventing outright abuse.

Describe the solution you'd like

Are there alternatives? Currently no OOTB alternatives.

I can submit a PR with this feature, but would appreciate any thoughts or feedback on the proposed solution.

kwin commented 4 years ago

Why not making it an option on the form container? An additional form component could be added multiple times which doesn't make sense for CAPTCHAs. Also such a flag on the container would allow to insert it by default via content policy.

ky940819 commented 4 years ago

That was my first thought as well. I didn't like the behavior though because if it's part of the container then where does it go? It would need to be inserted either before the form layout container or after it.

The standard location for a captcha is before the submit button, but that's also a component and may be included multiple times. Having it as a stand alone component allows the author to decide where to place it, and to apply various layouts to it.

kwin commented 4 years ago

IMHO just having a placement dropdown with beginning or end as option is sufficient as CAPTCHAs nowadays are almost always invisible (except for some disclaimer text and the optional modal dialog for the challenge)

gabrielwalt commented 4 years ago

Hi @ky940819, your contribution would be more than welcome!

Your specification makes a lot of sense to me, just one detail:

I agree that a validation framework will also greatly enhance the overall experience. Let's hope that we'll be able to tackle this asap, but probably also not before early 2021.

JasonUSC commented 1 year ago

Has there been any progress on adding captcha to forms? The forms components aren't really useful in production without this basic feature.