sepiariver / recaptchav2

Google's ReCaptcha V2 + V3 for MODX CMS: https://sepiariver.com/modx/recaptchav2-supports-recaptchav3/
https://sepiariver.com/
GNU General Public License v2.0
21 stars 15 forks source link

Dynamic, multi element rendering. #14

Closed Jsewill closed 6 years ago

Jsewill commented 7 years ago

Set up explicit rendering to support multiple elements on a page. See README.md for new/updated usage information.

sepiariver commented 6 years ago

Hi @Jsewill

Thank you so much for your work on this, and I'm so sorry it took so long to respond.

The changes in your PR, to the render snippet: https://github.com/Jsewill/recaptchav2/blob/869bb376f46ef16881e759050ac242c9b537b0d2/core/components/recaptchav2/elements/snippets/recaptchav2_render.snippet.php

...registers client scripts whether the implementation calls for multiple recaptcha's or not. Ideally the solution would support multiple recaptcha's, without forcing those scripts to be registered (making it optional). My opinion is that it's important enough to keep the Extra generic for all cases, and not to burden pages with extra scripts, that aren't needed for their use cases.

If you have any ideas on how to implement this in a way that makes additional resources optional, we'd really love to hear about them :)

Thanks again!