Tagged: contact forms, spam
-
AuthorPosts
-
September 9, 2017 at 9:59 am #849901
Hi there,
I’m receiving an awful amount of Spam recently using Avia forms and nor the captcha nor Google Re-Captcha seems to be helping.
I was wondering if you could help me providing a code to block sending of any form messages containing hyperlinks.Thanks for letting me know!
Much appreciated,JD
September 11, 2017 at 7:00 am #850361Hey JD,
Are you sure that the emails are coming through the form? In my experience RECAPTCHA should stop almost any spam. Please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply. Also please point out where the form in question is located.
Best regards,
RikardSeptember 11, 2017 at 9:14 am #850386Hello Rikard,
Thanks for the reply. Yes, very sure that the spam messages get sent through the contact forms, since I have a contact form submission DB plugin that captures all messages (https://www.vovcollection.com/wp-admin/admin.php?page=CF7DBPluginSubmissions).
Please find the login credentials in the private content. Most spam messages are coming from the first contact form on this page: https://www.vovcollection.com/palazzi-venice/ca-delle-vele/
FYI I activated recaptcha by adding this code to functions.php:
function ava_custom_recaptcha(){
?>
<script type=”text/javascript”>
var createCaptcha = function() {
var button = jQuery(“.avia_ajax_form .button”),
parent = button.parent(“.form_element”);
captcha = jQuery(“<p id=’reCAPTCHAV2′></p>”);button.attr(“disabled”, “disabled”);
captcha.insertBefore(parent);
};createCaptcha();
var onloadCallback = function() {
var publickey = ‘6LeffS8UAAAAADBZNN41EIfFxuaq9oIZ4iMeoIoi’;
grecaptcha.render(‘reCAPTCHAV2’, {
‘sitekey’ : publickey,
‘callback’ : ‘onSuccessfullCallback’
});
};var onSuccessfullCallback = function() {
jQuery(“input[type=submit]”).removeAttr(‘disabled’);
};
</script>
<?php
}
add_action(‘wp_footer’, ‘ava_custom_recaptcha’);if(!function_exists(‘avia_register_reCAPTCHAV2_scripts’))
{
if(!is_admin()){
add_action(‘wp_enqueue_scripts’, ‘avia_register_reCAPTCHAV2_scripts’);
}function avia_register_reCAPTCHAV2_scripts()
{
$prefix = is_ssl() ? “https” : “http”;
$api_url = $prefix.’://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit’;wp_register_script( ‘avia-google-reCAPTCHAV2-api’, $api_url, array(‘jquery’), NULL, true);
wp_enqueue_script( ‘avia-google-reCAPTCHAV2-api’ );
}
}I still think that blocking messages hyperlinks might be a good idea but please let me know your thoughts,
Thanks,JD
September 11, 2017 at 5:47 pm #850609Hi JD,
Here is a thread for you to consider
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.