I’m very new to coding - please talk to me like I’m a first grader
I’m working on our forms on our website (we’re using Salesforce’s Pardot form handlers) forms and even after putting in honeypot fields, we still continue to get a lot of spam.
Is there a way to write something that says if the first name and last name are the same (most of our spam is in that format) then the form is rejected without the robot seeing the error message? We don’t want to use CAPTCHA/reCAPTCHA or anything similar
Any and all help is greatly appreciated!!!
These are the fields I’ve entered:
<input type="submit" name="submit">
<div style="position:absolute; left:-9999px; top: -9999px;">
<label for="pardot_extra_field">Comments</label>
<input type="text" id="pardot_extra_field" name="pardot_extra_field">
</div>
<?php
if (preg_match('/viagra|cialis|poker|casino|google|sex|seo/', $_POST['company'])) {
// it's SPAM
}
?>
<?php
if (preg_match('/viagra|cialis|poker|casino|google|sex|seo/', $_POST['description'])) {
// it's SPAM
}
?>
</form>
<script>
$('form').submit(function(){
if ($('input#website').val().length != 0) {
return false;
}
});
type="text/javascript">
piAId = '715393';
piCId = '3126';
piHostname = 'pi.pardot.com';
$('form').submit(function(){
if ($('input#website').val().length != 0) {
return false;
}
});
(function() {
function async_load(){
var s = document.createElement('script'); s.type = 'text/javascript';
s.src = ('https:' == document.location.protocol ? 'https://pi' : 'http://cdn') + '.pardot.com/pd.js';
var c = document.getElementsByTagName('script')[0]; c.parentNode.insertBefore(s, c);
}
if(window.attachEvent) { window.attachEvent('onload', async_load); }
else { window.addEventListener('load', async_load, false); }
})();
</script>