Forum
Spam Protection on Forms
I have the Akismet API key set in my Form settings: https://thesite.com/cms/addons/apps/perch_forms/settings
But spam that looks pretty obvious is coming through. Any idea on how to test it? Or confirm Akismet is working through the form?
Should I be adding the "antispam" tag to form inputs, or is that just for comments (which I don't need since I don't have site commenting)?
That said, is this correct?
<perch:label for="name"><i class="fa fa-fw fa-drivers-license-o"></i> Name</perch:label>
<perch:input type="text" id="name" class="form-control" antispam="name" required="true" label="Name" />
Yes, you need to have the
antispam
attributes set, or nothing will be sent to Akismet.Once you have that, you'll be able to see from your Akismet account what's being stopped.
Great thanks! That will be very useful. Is my syntax correct in the line above?
"name" being the ID of the input tag, correct? Hard to test it really, so I want to make sure I have the syntax right.
Yes, that looks correct according to the docs.
https://docs.grabaperch.com/addons/blog/spam/
Ok. Though the docs say:
The antispam="url" is using the type, not the ID. Hence my confusion. So is the ID still right? Or is it by type?
There are four possible values.
name
,url
,email
andbody
.Ah, I see. So for future reference, here are the options for using the "antispam" tag in an input:
I don't believe
type="body"
is valid. There's no relationship between the field type and theantispam
value.Ok. So then what do you use antispam="body" for? I would guess it's for "text" and "textarea" types, correct?
It's for the main text of whatever you're evaluating as spam.
Ok thanks Drew!