How To Protect your AutoResponse Plus web-form from spam-bots

modified at June 28, 2007

AutoResponse PlusWhen you use AutoResponse Plus you can’t change the form-processing script to incorporate anti-spam features described earlier (How to protect a Contact-Form from Form-Spam bots).
And what now?

Fortunately the AutoResponse Plus (ARP3) supports mandatory fields. So we are able to use some JavaScript tricks to prevent ARP3 accepts forms from spam-bots.

mandatory fieldsThe ARP3 mandatory fields

Open the ARP3 Generate Form Code page. You’ll see all fields the ARP3 allows to use in your web-form. All of them could be a mandatory field.

The first decision you need is What the field would be used for spam-protection?
This could be any field you don’t use in your form. For example, the phone #3 field is suitable.
Check on the phone #3 checkbox and the appropriate mandatory option checkbox in addition to the general fields of your web-form. Then click the “Generate Code” button to get the html-code of your form with the additional phone3 field:
form code

Spam-protected ARP3 web-form

After generating the form you have to make some changes of your form-code:

<form method="POST"
onsubmit="if(this['phone3_man']){this['phone3_man'].value='0';}"
action="http://yourdomain.com/cgi-bin/arp3/arp3-formcapture.pl">
<div align="center"><center>
<p>First name<br><input type="text" name="first_name" size="20"></p>
</center></div>
<div align="center"><center>
<p>Phone #3<br><input type="text" name="phone3" size="20"></p>
</center></div>
<div align="center"><center>
<p>E-mail address<br><input type="text" name="email" size="20"></p>
</center></div>
<input type="hidden" name="subscription_type" value="">
<div align="center"><center>
<p><input type="submit" value="Go »"></p>
</center></div>
<input type="hidden" name="id" value="1">
<input type="hidden" name="extra_ar" value="">
<input type="hidden" name="phone3_man" value="1">
</form>

What we have done?
1) We removed the phone3 text-field.
2) We added onSubmit javascript-code into the <form ... > tag.
Now spam-bots wouldn’t fill in the phone3 field. And the ARP3 will reject a form without the phone3 once it’s mandatory.
The onSubmit javascript allows to turn off the mandatory phone3 field when the form submitted with a browser.

 

by Michel Komarov, © Copyright 2007. iCoder.com

 

Share in social bookmarking:These icons link to social bookmarking sites where readers can share and discover new web pages.  digg del.icio.us BlinkList Reddit NewsVine YahooMyWeb co.mments

Related Articles:

Got a question?   Leave a Reply

You must be logged in to post a comment.