WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Contact Form 7 Honeypot] Not W3C Compliant

[Resolved] [Plugin: Contact Form 7 Honeypot] Not W3C Compliant

  • Just letting you know of an issue I ran into. I ran a page with a Contact Form 7 form that included a honeypot field and it threw errors. The issue appears to be that you have the output generated with a <span> wrapping a <div>. I simply removed the <div> and added a style=”display:hidden;” to the <span> tag. I also added the “hidden” class to the same <span> tag. Seems to work fine.

    Cheers,

    Jeff

    http://wordpress.org/extend/plugins/contact-form-7-honeypot/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Ryan

    @daobydesign

    Cheers Jeff — just updated the plugin to reflect this.

    Great plugin, thank you so much! FYI, I had to wrap the shortcode in a <div style="visibility: none;"> tag to remove the space taken up by the hidden element. Not sure it that was the best way to do it or if there’s another way around it?

    Plugin Author Ryan

    @daobydesign

    Hi ebloss, terribly sorry about the slow reply — I didn’t receive a notification about your message.

    “visibility: none;” shouldn’t do anything, as it’s not valid CSS. The honeypot element should already be wrapped in an element that contains “display: none;”, which would hide it. However, it’s possible that the space is because CF7 runs through wpautop(), which replaces line breaks with BR or P tags. The only way around this is to make sure there is no line break where you insert the honeypot shortcode. You can stick it snug up against one of the other form elements to assure this.

    Plugin Author Ryan

    @daobydesign

    Hi ebloss, terribly sorry about the slow reply — I didn’t receive a notification about your message.

    “visibility: none;” shouldn’t do anything, as it’s not valid CSS. The honeypot element should already be wrapped in an element that contains “display: none;”, which would hide it. However, it’s possible that the space is because CF7 runs through wpautop(), which replaces line breaks with BR or P tags. The only way around this is to make sure there is no line break where you insert the honeypot shortcode. You can stick it snug up against one of the other form elements to assure this.

    LMMartens

    @lmmartens

    Hello! I am having a similar problem with the honeypot shortcode being visible in the contact form. I have attempted to use span, div, etc as suggested here, but I’m having no luck. What should I do?

    http://www.saysyou.net/contact/

    Plugin Author Ryan

    @daobydesign

    @lmmartens, that’s actually a very different problem, as it doesn’t seem the Honeypot plugin is doing anything at all (including generating the proper honeypot field).

    Can you confirm you’ve enabled the Honeypot plugin. The shortcode should be converted to the proper honeypot field if the Honeypot plugin is installed & activated.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] [Plugin: Contact Form 7 Honeypot] Not W3C Compliant’ is closed to new replies.