Following up on Bill's comments, I discovered that all webhosting services 
handle transmitting emails from Contact Forms in different ways.

I use Yahoo Webhosting (which is great) and for that service your form's 
action is a specific URL that processes and emails you the form's content. 
Their system is sort of a "closed circuit" that supposedly can only send 
emails to the address you designate in their Web Hosting Control Panel. So 
with Yahoo there is no need to take extra steps to prevent your Contact 
Form from being hijacked.

But it has no method of stopping bots from using your own form to send 
junky emails to you. That's what I'm hoping you all can help with...

The methods I have discovered are:

1) turning off autocomplete on the form
2) using unconventional phrases or random numbers for name="xx" and id="xx" 
( like "online address" instead or "email")
3) using some sort of question/answer system to make sure they are humans 
not bots ( like "Which animal barks? Dog or Cat?")

So on this test page...   http://easydigging.com/Contact/Contact-4.html
...I have a Contact Form that is wide open. As long as you put something in 
at least one of the fields it will transmit an email.

I have already done Steps 1 and 2, but really need help with step 3.

Here are some ideas for Step 3. Either would be acceptable. We prefer 
something easy that works with at most a simple Javascript...

A) the method currently in place is supposed to check for the number 12 (in 
answer to 6 + 6 = ?), but it doesn't work. I tried modeling it off the 
approach in this article: 
http://alittlecode.com/files/jQuery-Validate-Demo/#html   Maybe I screwed 
up the equalTo part, or just am not calling the JS properly?

B) use a few Radio Buttons with a multiple choice question. Like this 
article: 
http://stackoverflow.com/questions/6921680/jquery-quiz-compare-correct-answer-in-array

Either way, we also need to somehow prevent the email from being sent until 
the answer is correct. I though of maybe hiding or disabling the Submit 
button until the correct answer is entered. Or even submitting the form as 
soon as the correct answer is entered (which may work really simply with 
the radio button idea if it doubles as a stealth Submit button...)

Any help or ideas is greatly appreciated :)

On Thursday, December 6, 2012 1:17:26 PM UTC-6, Greg wrote:
>
> I am re-building an old site to be responsive using Twitter Bootstrap. But 
> just ran into a major roadblock with making a Contact Form. I can make the 
> "form" part easy enough, the HTML and CSS works fine.
>
> *But I can not figure out how to make it send the email and filter or 
> validate the fields (to minimize hacking and bots). Help?
> *
>
>

Reply via email to