WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7 Honeypot
[resolved] Not W3C Compliant (7 posts)

  1. Jeff
    Member
    Posted 1 year ago #

    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/

  2. Ryan
    Member
    Plugin Author

    Posted 1 year ago #

    Cheers Jeff -- just updated the plugin to reflect this.

  3. ebloss
    Member
    Posted 1 year ago #

    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?

  4. Ryan
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. Ryan
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  6. LMMartens
    Member
    Posted 11 months ago #

    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/

  7. Ryan
    Member
    Plugin Author

    Posted 11 months ago #

    @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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.