0

I am using Webform on Drupal 8; I have a few spambots that fill out the exact same form in the same way every day.

I want to do some kind of validation that automatically blocks these postings. For example, if the name given is "Spambot 1", I want to discard the webform submission automatically.

Drupal 7 has the Webform Validation module but this has not yet been ported to Drupal 8.

I found a code snippet on adding custom validation to a webform element, but this seems to be for providing helpful errors to allow the user to re-submit the webform, whereas I want to make it seem like the form was submitted but silently discard the submission.

4
  • Is Honeypot out for D8?
    – Kevin
    Commented Jan 7, 2019 at 1:04
  • @Kevin Yes, I have Honeypot enabled but I'm still getting a few specific spambots every day. Commented Jan 7, 2019 at 3:23
  • 1
    Even if you implement that, you still risk in the future getting spammed by new bots that fill out the form differently. If you use reCaptcha that will be the end of it.
    – No Sssweat
    Commented Jan 7, 2019 at 7:42
  • Definitly reCaptcha as @NoSssweat suggested, there even is an "invisbile" reCaptcha that is completely hidden from real users most of the time. It is silent to normal users and prevents submissions / forces captcha only on suspicious submits.
    – Hudri
    Commented Jan 7, 2019 at 11:23

2 Answers 2

3

All the available SPAM protection modules for Drupal 8 are listed on the Webform Add-ons documentation page.

Text inputs now support patterns, you could explore creating a negative lookahead pattern like ^(?!.spam).$,

1

To Avoid spam keywords on Webforms with field. just check this out, https://www.drupal.org/project/webform_spam_words

Administrators can provide the ability to add spam keywords, Error message, Webform field name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.