310 Posts
ricco
9 years ago
Topic

Hi,

I've got some issues with spam bots submitting forms. The captcha feature actually stops this from happening but I'm concerned because our international users will have a hard time with this, and I also have some rendering problem when the simbols entered in the captcha are wrong.

Is there another way to stop the spam besides having to type in the captcha?

Ideally I'd like to add a hidden field with css to the form but I don't know how to check if the field is empty with javascript.

Could someone point me in the right direction?

Thank you,
Regards,
ricco

Get a VIP membership
9 years ago
1
Level 1

Hi Ricco,

Did you took a look at this one:

https://www.seblod.com/products/19224

Regards

310 Posts
ricco
9 years ago
0
Level 2

Thank you Eric, but it's not what I'm after.

310 Posts
ricco
9 years ago
1
Level 1

I've done it. Here is how:

Created a text field: Message text.

Created a Code Before Store field in which goes the following code:

if(strlen($_POST['message_text']) > 0){
header('location: some redirect URL here.. '); //Send them way away from your form :)
die(); //Stop execution of the script
}

Then I hidden the text field with CSS like this:

.cck_message_text {
position:fixed;
visibility: hidden;
top:-500px; left:-500px;
}

Now every time the text field is filled the form redirects to the entered URL and is not saved. :)

Regards,
ricco

45 Posts
Jan
9 years ago
0
Level 2

Thanks Ricco, but what if I do not store the email fields (Storage: none)?

310 Posts
ricco
9 years ago
2
Level 1

Hi,

What email fields? I cannot understand you.

Regards,

ricco

45 Posts
Jan
9 years ago
1
Level 2

What I want to ask you is: 

will your PHP code in the Code Before Store Field stop the script form sending the email if storage of the fields of my contact form is set to "none"? 

Thanks and regards.

Jan

310 Posts
ricco
9 years ago
0
Level 3

Yes, I think so.

Get a VIP membership