SOLVED

Re: bogus form submits - how to block?

Go to solution
Anonymous
Not applicable

bogus form submits - how to block?

We are getting several bogus form submits that have bad numbers and bad emails. There's no pattern, such as 1234 or anything along those lines. The submits are always different, just with bad info. Has anyone found a solution for this?
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Dory_Viscoglio
Level 10

Re: bogus form submits - how to block?

Hi Sarah, you might try this:

<script>
(function (){
  // Please include the email domains you would like to block in this list
  var invalidDomains = ["@gmail.","@yahoo.","@hotmail.","@live.","@aol.","@outlook."];
 
  MktoForms2.whenReady(function (form){
    form.onValidate(function(){
      var email = form.vals().Email;
      if(email){
        if(!isEmailGood(email)) {
          form.submitable(false);
          var emailElem = form.getFormElem().find("#Email");
          form.showErrorMessage("Must be Business email.", emailElem);
        }else{
          form.submitable(true);
        }
      }
    });
  });
  
  function isEmailGood(email) {
    for(var i=0; i < invalidDomains.length; i++) {
      var domain = invalidDomains[i];
      if (email.indexOf(domain) != -1) {
        return false;
      }
    }
    return true;
  }
 
})();
</script>

View solution in original post

6 REPLIES 6
Josh_Hill13
Level 10 - Champion Alumni

Re: bogus form submits - how to block?

Not really. Marketo is supposed to auto block those. You could add some of your own code to do this as well.

Another way is to automate the obviously bad leads and segregate them, then review and delete them.

If it is a lot, call support and they might help.
Anonymous
Not applicable

Re: bogus form submits - how to block?

Unfortunately there's no obviously ones. It isn't until we try contacting them that we realize they're dead ends. Some people that we do reach say they never filled out the form.
Dory_Viscoglio
Level 10

Re: bogus form submits - how to block?

Yes, unfortunately this is just a part of having a form... there will always be some bogus form fillouts. You might try requiring certain formats for phone numbers using masking (although this can be problematic if you have fillouts from multiple countries), or requiring a business email address using some custom coding.
Anonymous
Not applicable

Re: bogus form submits - how to block?

Dory -- do you have any suggestions for the custom coding? I looked up some other Community Discussions that suggested code, but the code didn't work and Support won't help with custom coding.
Dory_Viscoglio
Level 10

Re: bogus form submits - how to block?

Hi Sarah, you might try this:

<script>
(function (){
  // Please include the email domains you would like to block in this list
  var invalidDomains = ["@gmail.","@yahoo.","@hotmail.","@live.","@aol.","@outlook."];
 
  MktoForms2.whenReady(function (form){
    form.onValidate(function(){
      var email = form.vals().Email;
      if(email){
        if(!isEmailGood(email)) {
          form.submitable(false);
          var emailElem = form.getFormElem().find("#Email");
          form.showErrorMessage("Must be Business email.", emailElem);
        }else{
          form.submitable(true);
        }
      }
    });
  });
  
  function isEmailGood(email) {
    for(var i=0; i < invalidDomains.length; i++) {
      var domain = invalidDomains[i];
      if (email.indexOf(domain) != -1) {
        return false;
      }
    }
    return true;
  }
 
})();
</script>
Anonymous
Not applicable

Re: bogus form submits - how to block?

Thank you so much Dory! That worked wonderfully!