Allow for more flexible form configuration

Created on 22 September 2014, almost 10 years ago
Updated 4 June 2024, 24 days ago

Problem/Motivation

Currently, the list of forms that Honeypot supports in form-by-form configuration is hardcoded into the module itself, and only includes general forms, node forms, contact forms, webforms, etc.

There are many contributed and custom modules (e.g. MailChimp, Entityforms, etc.) which provide custom forms that aren't covered by Honeypot's built-in interface. Users currently either have to use extra modules like Honeypot Entityform β†’ , build a custom module to add the form configurations to the Honeypot configuration page, or manually add the forms in as variables... None of these methods are especially elegant and/or maintainable.

Proposed resolution

A new field (or multi-value field) should be added on the Honeypot configuration page under the "Honeypot Enabled Forms" section, called 'Additional Forms'. In the description text, a simple description with a link to a new documentation page should be added, instructing the user how to find a form ID to add for the form they'd like to protect.

Proposed description:

Enable Honeypot protections for additional forms by entering their form IDs here. Enter one form ID per field. View instructions for finding a form's ID.

Remaining tasks

  • Create documentation page in Honeypot docs explaining how to find a form ID.
  • Add field to Honeypot admin form

User interface changes

Additional field on Honeypot admin form.

API changes

None.

Original report by @rooby β†’

Would it be possible to allow more flexibility in specifying forms to target?

I'm thinking along the lines of a text area field where you add a form ID per line and then honeypot is added to each form in that list.

Currently the checkboxes don't cover many possibilities and you might not want to add to all forms.

This should also stop all the "Add support for such and such form" issues.

✨ Feature request
Status

Needs review

Version

2.1

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia rooby

Live updates comments and jobs are added and updated live.
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.

Production build 0.69.0 2024