• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: How can this anti-spam script be done?

How can this anti-spam script be done? 16 years 10 months ago #3192

  • dino00
  • dino00's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 11
Hi guys.

What I want to do is this: I create a hidden empty field in my form having a caption of email. When the form is processed (during submission) I want to check if this field has been filled. If it has then it's a spam and the processing should stop else the form gets submitted normally.

It's a simple anti-spam trick but I believe it could be really efficient and what's even more important, user-friendly (something a captcha is not)

Thanks for any help
The administrator has disabled public write access.

Re:How can this anti-spam script be done? 16 years 10 months ago #3260

  • tglytle
  • tglytle's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
I need this to! I have computers spamming 1 of my forms that sends an e-mail response to the user. Captha does not slow it down. This spam computer uses the e-mail response to put my web URL in their spams to others. I really need to stop this thing!
The administrator has disabled public write access.

Re:How can this anti-spam script be done? 16 years 10 months ago #3359

  • arieh
  • arieh's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Another way of doing this more user friendly is by creating a simple text field with a question like \"What color is a firetruck?\", \"What color is grass\".

A bot (at least most of them ;)) won't know the answer while every human will know it's red or green.
The administrator has disabled public write access.

Re:How can this anti-spam script be done? 16 years 5 months ago #5343

  • Jazzer
  • Jazzer's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
That's a good idea. How would you actually script this?
The administrator has disabled public write access.

Re:How can this anti-spam script be done? 16 years 5 months ago #5348

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

You can achieve both of these tasks with RSform! Pro.
Hidden email
Setup a hidden field named "Email".
On the Scripts tab, paste this in the on form process script area:
if (isset($_POST['form']['Email']) && $_POST['form']['Email'] != '') die();

Human test
Setup a textbox named "Firetruck" with the caption "What color is a red firetruck ?".
On the Scripts tab, paste this in the on form process script area:
if (isset($_POST['form']['Firetruck']) && strtolower($_POST['form']['Firetruck']) != 'red') die();
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
Last Edit: 11 years 1 month ago by octavian.
The administrator has disabled public write access.

Re:How can this anti-spam script be done? 16 years 4 months ago #5816

I've set this up, and it works good. Except, if the customer doesn't enter the correct answer, or they skip the field, and they hit submit, it takes them to a blank page. Many customer's think that the form has been submitted, when it has not.

Is there anyway to give them an error page, stating that the field is missing?

Thank you.
The administrator has disabled public write access.

Re:How can this anti-spam script be done? 16 years 3 months ago #6004

Hi,

These looks like useful ways of stopping SPAM messages which have ballooned recently.
I'd also like to show an error message rather than a blank page if the user guesses the colour of grass incorrectly. Is it possible?

Thanks,
Chris
The administrator has disabled public write access.

Re:How can this anti-spam script be done? 15 years 10 months ago #7447

  • tallship
  • tallship's Avatar
  • OFFLINE
  • Fresh Boarder
  • So foul a sky clears not without a storm
  • Posts: 8
djproaudio wrote:
I've set this up, and it works good. Except, if the customer doesn't enter the correct answer, or they skip the field, and they hit submit, it takes them to a blank page. Many customer's think that the form has been submitted, when it has not.

Is there anyway to give them an error page, stating that the field is missing?

Thank you.

You can make the field mandatory, and then if they don't fill it out the error handler will tell them to fill the field out.

That way, they know whether the form has been submitted, since they can't finish it until it is correct.
Bradley D. Thornton
Manager Network Services
NOMAD Internetwork
NorthTech Computer
http://NorthTech.US

The administrator has disabled public write access.

Re:How can this anti-spam script be done? 15 years 10 months ago #7448

  • tallship
  • tallship's Avatar
  • OFFLINE
  • Fresh Boarder
  • So foul a sky clears not without a storm
  • Posts: 8
Oh, my bad. If they guess it incorrectly. hm...

Well, you can tell them that they need to get the color right in the description pane, but other than that, I think your choices are that of alpha, numeric, alphanumeric, etc., for enforcing form fill.
Bradley D. Thornton
Manager Network Services
NOMAD Internetwork
NorthTech Computer
http://NorthTech.US

The administrator has disabled public write access.

Re:How can this anti-spam script be done? 12 years 8 months ago #18703

  • jabbber
  • jabbber's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
This is the message that tech support sent me when i asked them about the blank screen solution. i implemented their solution below and it worked....
You can consider using a script similar to the following one in the "Scripts called on form process" area:
if (isset($_POST['form']['firetruck']) && strtolower($_POST['form']['firetruck']) != 'white')
$invalid[] = RSFormProHelper::getComponentId("firetruck");

in order to simply invalidate the anti spam field. In the above script you will simply have to replace the "field_name" value with the actual name of your field in the form.
The administrator has disabled public write access.

Re:How can this anti-spam script be done? 11 years 1 month ago #26799

  • mickng
  • mickng's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hi, I tried the hidden field method as mentioned below but it didn't quite work. Tested it by unhiding it and regardless of whether I type something or not, it still submits the form.

I created a hidden form called Email2 (because I need the Email field for actual email)
then pasted the script below (modified to Email2) in the form process script field.

Help.


Cheers,
Mick
octavian wrote:
Hello,

You can achieve both of these tasks with RSform! Pro.
Hidden email
Setup a hidden field named "Email".
On the Scripts tab, paste this in the on form process script area:
if (isset($_POST['form']['Email']) && $_POST['form']['Email'] != '') die();

Human test
Setup a textbox named "Firetruck" with the caption "What color is a red firetruck ?".
On the Scripts tab, paste this in the on form process script area:
if (isset($_POST['form']['Firetruck']) && strtolower($_POST['form']['Firetruck']) != 'red') die();
Last Edit: 11 years 1 month ago by octavian.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!