Forums

Restricting Incoming Emails

aforantman 19 Feb, 2012
Hi everyone,

We've had a fairly hefty amount of spam come through one of our Chronoforms over the weekend (300 + emails). The form is styled quite specifically, and doesn't have room for a captcha code. The form is used for event booking enquiries for one of our clients, and we were wondering if it's possible to restrict email submissions to a specific country (we're in Australia). Because of the nature of the business, our client is only going to get requests from locals anyway, so we figured this may be an easy way to rectify this problem.

Anyone have any thoughts on this?
GreyHead 20 Feb, 2012
Hi aforantman ,

There are two possibilites without adding to your form layout.

a) You can add a Honey Trap input. That is a normal input which is hidden by CSS so that normal users can't see it. Then use Serverside validation to check if it has been answered. If it has then reject the form.

b) I published an Anti Flood [GH] action yesterday which allows you to set a time interval for re-submissions; you can also use it with s ReDirect User action to send the 'flooder' off somewhere else.

Bob
aforantman 20 Feb, 2012
Thanks Greyhead,

I am using Chronoforms 3.1
Could you give me a run down on how to achieve option a):

I would add the following code to the html yes?

<p class="robotic" id="pot">
            <label>If you're human leave this blank:</label>
            <input name="robotest" type="text" id="robotest" class="robotest" />
        </p>


With the css?
    .robotic { display: none; }


And then what would I add into the serverside validation box to make all this work?
(apologies, this isnt my strong area?)

Regards,

Anthony.
GreyHead 21 Feb, 2012
Hi Anthony,

Please try
<?php
$robotest = JRequest::getString('robotest', '', 'post');
if ( $robotest ) {
  return 'Please go away';
}
?>

Or you could set a default value for the input and check if that has changed.

You might also want to turn eh esubmissions limit on in the Form General tab.

Bob
This topic is locked and no more replies can be posted.