Honeypot field showing up at bottom of all forms where enabled

Created on 26 July 2017, over 7 years ago
Updated 15 August 2024, 4 months ago

After installing and configuring Honeypot, its field is showing up at the bottom of all forms where it is enabled. There is no labeling of the field - just a huge field area after the form's submit button.

My Honeypot element name is "Fax". When I look at the page source for a displayed form, this is the HTML for that mystery field:

<input autocomplete="off" data-drupal-selector="edit-fax" type="text" id="edit-fax" name="Fax" value="" size="20" maxlength="128" class="form-text w3-input w3-border w3-theme-border" />

The attached image shows how it looks on one form. The problem field is right below the "Send request" button.

✨ Feature request
Status

Needs review

Version

2.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Rounder

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States ben.hamelin Adirondack Mountains, NY

    Description in #13, #16 were our problem (no wrapper around {{ children }})
    This fixed for us in custom theme template container.html.twig:
    <div{{ attributes.addClass(classes) }}>{{ children }}</div>

  • πŸ‡ΊπŸ‡ΈUnited States tenten71

    I had the same issue in D9 and turned out it was the custom template fix #16 that helped.
    Now I just have to remember why I had removed the wrapper DIV in my theme originally.

  • πŸ‡ΊπŸ‡ΈUnited States tr Cascadia
  • πŸ‡ΊπŸ‡ΈUnited States tr Cascadia

    I put the patch from #28 into an MR.

    This needs reviews and manual tests to ensure it fixes the problem.

    It also really needs a test case that demonstrates the problem. Then, we will have a way to actually test the fix and ensure the fix continues to work in the future. This probably just needs to add a containter.html.twig to the testing theme, as described above, then display a form and check the visibility of the honeypot element.

Production build 0.71.5 2024