I've enabled community in Sandbox and used Napili community template for community Builder. We need to implement Captcha process in Self Register Page. So we need to edit Standard Self Register Lightning Component. But the Community Lightning Components are missing in my Sandbox for edit(Developer Console). But its visible in Community Builder. I've also checked in my Developer Org , in which we've all Lightning Components related to Community. How to enable it. Please advise on this.


When you create a community for the first time in an org, Salesforce generates a few different lightning components for you. One of these components is called "selfRegister".

It's not very intuitive, but if you uncomment the very first line in the selfRegister component, then you'll get a component named "Custom Registration" or something similar next time you open or refresh community builder.

You might have to add the new found custom registration component onto the Registration page, but once you start poking around a bit, you'll notice that the component changes when you update it in your IDE of choice.

I'd suggest leaving this component alone though, and creating your own Self Registration component (make sure the component uses the forceCommunity:availableForAllPageTypes interface).

For the recaptcha piece, I know first hand how tricky this can get. The recaptcha library basically forces you to use it over a CDN. This means you usually have to fully qualify the javascript URL (e.g. www.google.com/recaptcha/api.js). The catch is that lightning components don't support CDNs.

If you dive further into the captcha javascript, you'll notice that the main javascript (api.js), uses a link to another javascript file, and that link contains a timestamp, which is updated roughly every week or two.

To get around the CDN limitation, I downloaded both the api.js as well as the timestamped js and stuck them into static resources, and got captcha working at least for now.

Others, like mentioned in this link have had success with a combination of Visualforce along with their lightning component(s).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.