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:

4 Responses to “How To Protect your AutoResponse Plus web-form from spam-bots”

  1. george Says:

    Hello Michel

    Thank You for your very fast service on installing my autoresponder.
    I have a question if you don’t mind.

    I am trying to automatically put an affiliate username into an Autoresponse Plus sign-up form using javascript, maybe with the custom tag.
    Is this possible?

  2. michel Says:

    Hello George,

    Yes, sure.
    Insert a javascript inside your ARP form code like below:

    <form method="post"
    action="http://yoursite.com/cgi-bin/arp3/arp3-formcapture.pl">
    Name: <input name="first_name">
    Email: <input name="email">
    <input name="id" value="1" type="hidden">

    <script type="text/javascript">
    <!--//
    document.write('<input name="affiliate" value="'
    +username+
    '" type="hidden">');
    //-->
    </script>

    </form>

    The username variable should be determinated before the form-code.

    Hope this helps.

    \Michel

  3. george Says:

    Sorry I don’t think I explained it to well.
    I am trying to input this value

    Into the form, so that I can use that value in my follow up emails, so the affiliate still gets credit.
    I could then use http://www.mydomain/{affiliate username} inside ARP.

    Would it work if I put the URL inside value like
    value=”‘
    +http://www.mydomain.com/showaff.php?id=name+
    ‘”

    Thank you so much for your help.
    George

  4. michel Says:

    Hello George,

    If you use a hidden fields with custom_ prefix, you’ll be able to use this custom-field in your ARP messages.
    For example, if you insert a field like this:

    <script type="text/javascript">
    <!--//
    document.write('<input name="custom_affiliate" value="'
    +username+
    '" type="hidden">');
    //-->
    </script>

    You’ll be able to use the custom dynamic tag {CUSTOM_affilate} in your ARP messages to insert the actual username. So a link in your message would look like this:
    http://www.mydomain.com/showaff.php?id={CUSTOM_affiliate}

    Michel

Got a question?   Leave a Reply

You must be logged in to post a comment.