• Resolved petehawk

    (@petehawk)


    Hi

    Just a quickie. I notice there is a way of adding hidden field via functions.php. How would I use this to cut down on junk/spam mailings?

    Pete

Viewing 1 replies (of 1 total)
  • Plugin Author fabianlindfors

    (@fabianlindfors)

    Hi Pete!

    One way to reduce spam is to use a “honeypot” field. This works by adding a field (e.g. a checkbox) which is hidden by CSS. Most spam bots tend to simply fill all fields it comes across which means it will also fill the honeypot field which is hidden to regular users.

    With Advanced Forms you could use the af/form/hidden_fields (documentation) action to add a checkbox with some phony name, i.e. “_terms_of_service”. Then hook into the af/form/submission and check the $_POST variable to see if “_terms_of_service” was checked. If it is simply kill the request using die().

    Also make sure to hook af/form/submission with a lower priority than 10, otherwise entries may be created and emails may be sent.

    Hope this helps! ??

Viewing 1 replies (of 1 total)
  • The topic ‘Anti-spam field’ is closed to new replies.