add plugins to Contact form types, remove special-casing for 'personal' contact form type

Created on 6 May 2016, about 9 years ago
Updated 17 May 2025, 2 days ago

Contact forms are full of special handling for the personal form. And apart from the personal contact form, no special functionality can be added to contact forms: they're just plain forms.

Instead, we could add a new plugin type that provides custom functionality for a contact form. This would allow contrib modules to add new kinds of contact form, and remove a lot of the special case code from Contact.

We can probably do this in a backwards-compatible manner, as the special case code checks for the 'personal' bundle name a few times, and most of the time calls isPersonal() on the Drupal\contact\Entity\Message.

So isPersonal() could be changed to check the ID of the plugin, and return TRUE if it's the plugin that handles the personal contact form functionality. In essence, it becomes a backwards-compatibility wrapper.

Feature request
Status

Postponed

Version

11.0 🔥

Component

contact.module

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

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.71.5 2024