UndefinedOffset / silverstripe-nocaptcha

A spam protector and form field using Google's reCAPTCHA v2 or optionally a foundation v3 implementation
BSD 3-Clause "New" or "Revised" License
31 stars 37 forks source link

Fixes issue 39 #54

Closed christopherbolt closed 5 years ago

christopherbolt commented 5 years ago

Fixes issue 39 https://github.com/UndefinedOffset/silverstripe-nocaptcha/issues/39 It's a scope issue caused by rendering the fields in a loop resulting in the last field rendered to always be the one processed when any form submits. This solution breaks the rendering into a separate function and then just call that function in the loop.

UndefinedOffset commented 5 years ago

Thanks for the pull, just one change can you replace the uses of let with var so we maintain more compatibility. Thanks

christopherbolt commented 5 years ago

Have updated with var instead of let as requested. Let me know if you have further suggestions.

UndefinedOffset commented 5 years ago

All good, I’ll do a tag next week :), thanks!