spam
Last updated Apr 29th, 2019 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$301 per month—let's make that $500!
Learn moreThe spam hook¶
The spam hook will check all the fields specified in the property spamEmailFields against a spam filter via StopForumSpam. If the user is flagged as a spammer, it will show an error message for that field checked.
The spam hook requires either cURL or Sockets support in your PHP installation (The same requirements for Package Management).
Available Properties¶
name | description |
---|---|
spamEmailFields | Optional. A comma-delimited list of email fields to check. Defaults to 'email'. |
spamCheckIp | If true, will also check the IP of the submitter. Defaults to false. |
Usage¶
Simply specify the "spam" hook in your FormIt call. FormIt will handle the rest.
[[!FormIt? &hooks=`spam`]]
Checking the IP For Spam¶
Although it is strongly recommended not to use the IP for spam checking (since spammers can easily change IP addresses, and checking IPs often gives false positives), FormIt provides you the option. Just set the &spamCheckIp value to 1 on your FormIt call.
See Also¶
- FormIt.Hooks.email
- FormIt.Hooks.FormItAutoResponder
- FormIt.Hooks.FormItSaveForm
- FormIt.Hooks.math
- FormIt.Hooks.recaptcha
- FormIt.Hooks.redirect
- FormIt.Hooks.spam
- FormIt.PreHooks.FormItLoadSavedForm
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$301 per month—let's make that $500!
Learn more