PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Honeypot Form Validation causes W3C validation errors

  1. Just going about validating my site with the W3C validator some more, and came across another validation issue with Gravity Forms.

    When including the anti-spam honeypot for form validation, I was able to pass W3C validation, but with a warning, that one of my form fields had a < label for="input_3_8" >, but a field with that id didn't exist. I did some digging, and found the problem.

    On line 1233 of common.php, you have:
    return "<div class='ginput_container'><input name='input_{$id}' type='text' value=''/></div>";
    which returns no ID for the form, and a wrong name. ( name="input_8" )

    So, I edited it to look like this:
    return "<div class='ginput_container'><input name='{$field_id}' id='{$field_id}' type='text' value=''/></div>";
    and it returns the proper information, and I am getting no more validation errors with W3C validator.

    Just thought you'd like to know, instead of having to track this down yourself.

    Posted 14 years ago on Friday November 19, 2010 | Permalink
  2. Thanks for pointing it out, we will take a look and get it updated in the next release.

    Posted 14 years ago on Friday November 19, 2010 | Permalink