Last active
March 22, 2019 17:38
-
-
Save bowler865/5c471956930b99f2724bca3082b3c02d to your computer and use it in GitHub Desktop.
Mura-Form-Recaptcha
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- | |
Example of how to include the dsp_form_protect.cfm file which displays | |
the recaptcha if you have the site key and secret set in site settings. | |
---> | |
<div class="form-group<cfif listfindnocase(ErrorFields, "recaptcha", ";")> has-error</cfif>"> | |
<div class="col-sm-12"> | |
#m.dspObject_include(thefile='form/dsp_form_protect.cfm')# | |
<cfif listfindnocase(ErrorFields,"recaptcha",";")><span id="helpBlock" class="help-block">#Errors.recaptcha#</span></cfif> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- | |
If you have a form you are validating completely on your own | |
drop this into your validation file or method | |
This requires you to have the site key and secret set in site settings. | |
---> | |
<cfset recaptchaVerification = $.getBean('utility').reCAPTCHA($.event())> | |
<cfif !recaptchaVerification> | |
<cfset errors.recaptcha = "#$.rbKey('recaptcha.error')#"> | |
<cfset ErrorFields = ListAppend(ErrorFields, "recaptcha", ";")> | |
</cfif> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment