Quote:
Originally Posted by littlegiant
I killed spam dead on my feedback form by using Javascript to write out a hidden input:
<script type="text/javascript">
<!--
document.write('<input type=\"hidden\" name=\"xyzxyzxyz\" value=\"test\">');
// -->
</script>
Then I made that hidden input a required field in the script that processes the form.
Then I used Javascript to write out the Submit button.
<script type="text/javascript">
<!--
document.write('<input type=\"submit\" value=\"Submit\">');
// -->
</script>
<noscript>Javascript must be enabled to submit this form.</noscript>
Boom. No more spam.
Not going to win any awards for accessibility (since Javascript must be enabled to submit the form) but it worked.
|
That's an awesome idea for forms. I will have to start putting that on some of mine. Thanks for that tip.