Skip to content

Commit

Permalink
Merge pull request #3 from gravityview/develop
Browse files Browse the repository at this point in the history
Version 1.0.6.1
  • Loading branch information
zackkatz authored Mar 15, 2021
2 parents 25dd045 + 1713830 commit 873898c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
8 changes: 7 additions & 1 deletion gravityforms-zero-spam.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@ public function add_key_field() {
document.addEventListener("DOMContentLoaded", function() {
var gforms = '.gform_wrapper form';

document.querySelector( gforms ).addEventListener( "submit", function ( e ) {
var el = document.querySelector( gforms );

if ( ! el ) {
return;
}

el.addEventListener( "submit", function ( e ) {
var input = document.createElement( "input" );
input.type = 'hidden';
input.name = 'gf_zero_spam_key';
Expand Down
12 changes: 8 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: gravityview, karpstrucking, supporthero
Tags: gravityforms, gravity forms, anti-spam, antispam, spam, spam-blocker, spambot, spammer, addons, add-ons
Requires at least: 3.0.1
Tested up to: 5.6.1
Tested up to: 5.7
Stable tag: trunk
Requires PHP: 5.2.6
License: GPLv2 or later
Expand All @@ -12,11 +12,11 @@ Enhance your Gravity Forms to include anti-spam measures originally based on the

== Description ==

This plugin adds a non-obtrusive anti-spam measure to all of your Gravity Forms. This measure is originally based on David Walsh's "Zero Spam" technique.
This Gravity Forms add-on blocks spam using a non-obtrusive anti-spam measure. There are no settings or configuration needed: all you need to do is activate the plugin!

There are no settings or configuration needed: all you need to do is activate the plugin!
Do you not want to use ReCAPTCHA because it's user-hostile? Use this instead! There are no stoplights or crosswalks here.

Requires: Gravity Forms v1.5+
Originally based on David Walsh's "Zero Spam" technique. Requires [Gravity Forms](https://www.gravityforms.com/?partner_id=1210629&irgwc=1&utm_medium=affiliate&utm_campaign=1210629&utm_source=Katz%20Web%20Services%2C%20Inc.).

== Frequently Asked Questions ==

Expand All @@ -30,6 +30,10 @@ No. For that, we recommend Ben Marshall‘s [WordPress Zero Spam plugin](https:/

== Changelog ==

= 1.0.6.1 on March 15, 2021 =

* Fixed: JavaScript "null is not an object (evaluating 'el.addEventListener')" error on pages without a form

= 1.0.6 on March 11, 2021 =

* Improved: No longer requires jQuery
Expand Down

0 comments on commit 873898c

Please sign in to comment.