Extension

Developer
Supported

Snaptcha

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6

Back to this add-on's main page
View Other Add-ons From PutYourLightsOn

     

You must be logged in to post.

Issues with Browser AutoComplete Feature

Support (Resolved)

msunickb
msunickb

I have no had three client sites that say they’re getting the failed spam message from Snaptcha when the form is submitted. After researching, I notice that the failure comes most often when someone uses the autocomplete browser feature. I’m assuming it’s filling in the snaptcha value with something stored in their autocomplete entry. Can anyone give any advice how to avoid this?

As a sidenote, this tends to happen on shorter forms that aren’t asking for a lot of information. For example, if it’s a contact form that requests name, email and message it seems autocomplete fills in the snap field with other contact information that autocomplete stored like an address, city, etc.

Thanks!

Nick

PutYourLightsOn
# 1
Developer
PutYourLightsOn

Hi Nick, have you tried changing the “Field Name Prefix” to something other than “snap”? Autocomplete should generally only fill in fields it knows about and the Snaptcha field is appended with a random string, so I’m not sure that this is the real issue. See if it makes any difference though.

Ben

msunickb
# 2
msunickb

I know, I was confused why the browser would do that as well but it was doing it for many people, and I was able to replicate with my own computer/browser.

I will change the default field name and see if that helps.

Thank you,
Nick

PutYourLightsOn
# 3
Developer
PutYourLightsOn

Ok, let me know if it makes any difference.

msunickb
# 4
msunickb

Hi again,

Following up on this issue in EE6; still receiving the same behavior even when updating the default prefix in settings. Using version 3.0.0 of Snaptcha.

PutYourLightsOn
# 5
Developer
PutYourLightsOn

What value is being added to the hidden Snaptcha field when the autocomplete kicks in?

msunickb
# 6
msunickb

From my test with this method, it’s getting an email address. I obviously changed the prefix value to ‘snapper’:

$(’.snapper’).children(‘input’).on(“change keyup blur input”, function() {
  var $this = $(’.snapper’).children(‘input’);
  console.log($this.val());
});

PutYourLightsOn
# 7
Developer
PutYourLightsOn

The hidden input field’s name should be `snapper_` followed by 9 random alphanumeric characters. On each page refresh it will be different, so I don’t see why autocomplete would ever be applied. Do you have the security level setting set to `High`?

msunickb
# 8
msunickb

Right, that’s why I was confused as well. I have my setting set to Low currently.

PutYourLightsOn
# 9
Developer
PutYourLightsOn

Has changing the field name helped? I cannot replicate this issue.

msunickb
# 10
msunickb

Unfortunately, it hasn’t helped. But, oddly, when I just set the ‘Name’ input on my form to autocomplete=“no”, I can use autofill on all other fields with no issue in submitting the form. Very strange.

PutYourLightsOn
# 11
Developer
PutYourLightsOn

Hmm that is strange, I wonder if the Snaptcha field was in the same fieldset as the `name` field?

msunickb
# 12
msunickb

It wasn’t contained within the same <fieldset> element, but within a similar parent.. regardless, I’ve been able to get around the issue by disabling autocomplete on the inputs for the affected forms.

PutYourLightsOn
# 13
Developer
PutYourLightsOn

Glad to hear it!