Skip to content

Simple time-based antispam mechanism #78

@schirnerGIT

Description

@schirnerGIT

What feature are you requesting?

Hello Matthias,

until a more advanced spam solution is available, it might be worth adding a simple time-based antispam mechanism.

On form submission, the plugin could check whether at least a minimum amount of time (for example, 11 seconds) has passed since the page was loaded. If not, the submission would be blocked in the same way as when a required field is missing.

The example value of 11 seconds should be configurable in the settings, as depending on the number of form fields this value may need to be higher or lower.

The idea behind this approach is that a human user cannot realistically fill out and submit all fields within a very short time, whereas a bot can. I am already using this approach in my own projects across multiple platforms, and it significantly reduces spam in production environments.

I have attached a working implementation as a reference:

/wp-content/plugins/form-block/assets/js/validation.js

/wp-content/plugins/form-block/assets/js/build/validation.min.js

Thank you for considering this suggestion.

Hektor Gjini

validation.js
validation.min.js

Why is this feature necessary?

to reduce spam submissions

Are you expecing side-effects?

no

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions