Jump to content

Content filter form submissions?


lbeachmike

Recommended Posts

Hi there -

Instead of, or in addition to, using captcha verification ... is there a way to content filter the submission forms?  In other words, I want any form that contains the word "abcxyz" NOT to actually be submitted.  Is there a simple solution to achieve this?

Thanks.

Mike

Link to comment
Share on other sites

5 hours ago, lbeachmike said:

Instead of, or in addition to, using captcha verification ... is there a way to content filter the submission forms? 

what are you defining as submission forms? the contact page, support tickets, checkout or all of the above ??

5 hours ago, lbeachmike said:

In other words, I want any form that contains the word "abcxyz" NOT to actually be submitted.  Is there a simple solution to achieve this?

a simple solution that covers all fields on all forms ? not off-hand.. I mean it can be done, but it would surely require multiple hooks, js or template tweaks...

what's the reason for the question - are you getting spammed ?

Link to comment
Share on other sites

Hi - I'm sorry - I should have been more clear.  This is contact form spam.

I realize reCaptcha is a recommended option - but why would WHMCS not simply have the same spam functionality built in for the contact form, in the same way it is built in for email submission?  If I could simply filter any submission containing the word "viagra" in the subject or body, 99% of my contact form spam would be eliminated in 15 seconds worth of work.

Link to comment
Share on other sites

16 hours ago, lbeachmike said:

I realize reCaptcha is a recommended option

indeed - although there are ways to bypass it, it's probably better on than off.

16 hours ago, lbeachmike said:

but why would WHMCS not simply have the same spam functionality built in for the contact form, in the same way it is built in for email submission? 

possibly because it's never been  feature requested (though even if it had, that's not a quick way to get anything done with WHMCS!); possibly because WHMCS expect recapatcha to stop a lot of this; possibly because you could filter the emails off before they ever hit your inbox if they contain specific words via cpanel filters, spamassassin, spamexperts etc... could be any number of reasons.

16 hours ago, lbeachmike said:

If I could simply filter any submission containing the word "viagra" in the subject or body, 99% of my contact form spam would be eliminated in 15 seconds worth of work.

not 15 seconds of my work - it's taking me longer than that to reply to your question! 😉

two thoughts occurred to me about this - both hooks.

  1. you could filter the text as it's being typed (or pasted) and replace specific words with other words, or removing them entirely...  that would be a JS footer hook... but I don't think that does what you want because if the user types in "buy viagra now", the hook would replace viagra with a blank and they would be left with "buy  now" and still be able to submit it - so it would still be spam, you just wouldn't have a clue what they were spamming you about. 😕
  2. after submission, you check both form fields to see if either contain any blocked words - if they do, it returns an error message telling them that there is a blocked term in message/subject and would prevent the submission occurring until those words were removed... the problem with this is I don't know whether you can prevent submission as all the existing core validation does is check that there is "something" in those four fields and if so, it sends the email.

to be honest, in your situation I don't think that I would tackle this from the client side with hooks - I would either filter these emails via cPanel etc, or change the contact link to redirect to a support department (which would give you a lot more options when it comes to filtering via hooks) - the contact form is a prehistoric feature in WHMCS and very limited in how it can be changed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated