Skip to content

Instantly share code, notes, and snippets.

@reachkamrul
Last active April 1, 2021 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save reachkamrul/845614445b6049dbf22fc977e6e8c33a to your computer and use it in GitHub Desktop.
Save reachkamrul/845614445b6049dbf22fc977e6e8c33a to your computer and use it in GitHub Desktop.
add_action('recaptcha_custom_function', 'recaptcha_custom_function_callback', 10, 1 );
function recaptcha_custom_function_callback( $form) {
echo '
<script type="text/javascript">
jQuery( document ).ready(function() {
jQuery(".ff-btn-submit").attr("disabled", "true");
});
function enableBtn(){
jQuery(".ff-btn-submit").removeAttr("disabled");
}
</script>';
echo "<script src='https://www.google.com/recaptcha/api.js' async defer ></script>";
?>
<div class="ff-el-group" data-name="recaptcha">
<div class="ff-el-input--content">
<div class="ff-el-recaptcha g-recaptcha" data-sitekey="6LcpRNoZAAAAAB5CPHvzM-n-RfVvyFojnbxjTNOB" data-callback="enableBtn"></div>
</div>
</div>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment