Blocking messages from being submitted that contain spam

By: Charles Harford | Asked: 02/09/2024
ForumsCategory: How-toBlocking messages from being submitted that contain spam
Charles Harford asked 3 months ago
Can anyone tell me how to prevent contact forms from being submitted if the message field contains spam or unwanted junk content? I have a simple contact us form with a message set as a paragraph field. The only validation option I can see is that it cannot be blank. I cannot see any other options to add any content filtering to prevent site visitors from entering junk or unwanted text into this field. I have tried using the suggested way of using the wordpress built in Disallowed Comment Keys in Settings > Discussion but this did not work. I have also tried adding custom code snippets such as one from the formidable forms developer knowledge base like this:
add_filter('frm_validate_field_entry', 'my_custom_validation', 10, 3);
and:
add_filter( 'frm_filename_spam_keywords', 'my_custom_function' ); but these do not work either. Any ideas would be very much appreciated.
Question Tags:
1 Answers
Abby BuzonAbby Buzon answered 1 month ago

Hi Charles, 

  1. Just a FYI - Comments are unrelated to Forms or form submissions, etc.  That's just RE: Comments on blog posts, located in wp-admin under Comments.
  2. In the individual forms' Settings, you'll see a section just for Buttons. See Screenshot attached.  There, you can set a the Conditional Submit Button.  
  3. Go into Formidable's Global Settings and setup Recaptcha and add ReCaptcha field to the form. 
  4. Last advice, if you wouldn't refer to yourself as a "Developer", use extra caution performing any customizations prescribed in a Developers' forum or KB.  When it doubt, leave it out.  Unless you're really intent on learning more, then by all means, go for it.  I've just seen it come back to bite people down the road - you forget you even added it, wouldn't think it would cause something to malfunction... next thing you know you've created a security breach and you have 10 admins you've never heard of and folders full of stolen bank and credit card information on your server. (True story! Two separate websites, but both are actual problems I've dealt with)
Attachments

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right