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.
$405 per month—let's make that $500!Learn more
The 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).
|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.|
Simply specify the "spam" hook in your FormIt call. FormIt will handle the rest.
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.