We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19250
    • 10 Posts
    Hey there... i am currently using eform as a sign-up and contact form on my site. i have the CAPTCHA enabled but it doesnt look the greatest... after doing some searching, looks like some are starting to get away from that and create fields that are not visible. then they check to make sure they do not get filled out... bots will usually fill out the field but a person cannot because its not visible.

    my question is how can i use eform to require that a field be empty. im not sure if i make sense.. let me know if you need more info.

    thanks!
      • 11468
      • 20 Posts
      Not sure if I am on the right lines as to what you want but here’s my tuppence!
      I used this tutorial to create my contact form > http://codingpad.maryspad.com/2009/05/31/building-a-website-with-modx-for-newbies-part-9-adding-a-contact-form-using-eform/comment-page-1/#comment-9193

      You can then just adapt the chunk you create called eFeedBackForm to include your hidden input. Is that what you are after? Sorry if not; I’m a relative noob too grin
        • 16278
        • 928 Posts
        I have the following at the bottom of one contact form
        <noscript><hr />
        Javascript is not enabled. This box is a precaution against abuse. <br />Please <b>LEAVE IT BLANK</b>, or your message will be rejected. <br />Fake number: [+randigit+]
        <input type="text" name="captcha" value=" " eform="Abuse blocker:string:1:Must be blank!:#LIST :-], ,">
        </noscript>
        

        [+randigit+] is a placeholder generated by a little snippet to produce a PIN-style four-digit fake CAPTCHA. You could just put plain static text in if you prefer. The initial value of the input field is a single space, which is in the list of things that validation will match. I have to confess it’s a while since I did this one, and I don’t remember the details of how I arrived at this validation code, but I just tested it on a local copy of the site, and it works.

        It’s rare for bots to do Javascript, and most users have it enabled, so this targets the honeytrap at the bots, and doesn’t bother the humans with pesky semi-legible things to copy. The humans that do run across it just have to believe the message.
        laugh KP