lbeachmike Posted August 10, 2019 Share Posted August 10, 2019 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 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 10, 2019 Share Posted August 10, 2019 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 ? 0 Quote Link to comment Share on other sites More sharing options...
lbeachmike Posted August 10, 2019 Author Share Posted August 10, 2019 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. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 11, 2019 Share Posted August 11, 2019 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. 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. 😕 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. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.