Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
One of the features on contact module roadmap is to make email-sending an optional element of contact forms, with storage instead.
Proposed resolution
Make storage and sending optional on a per contact-form basis
Remaining tasks
Patch
Tests
Review
User interface changes
Some contact forms won't require an email address for recipients
API changes
Contact form recipients properties becomes optional
New contact form 'store' field
#1856560: Store and render contact messages (and add Views support)
Comment | File | Size | Author |
---|---|---|---|
#5 | optional_contact_form_email-2325805-5.patch | 4.99 KB | benelori |
Comments
Comment #4
benelori CreditAttribution: benelori commentedComment #5
benelori CreditAttribution: benelori commentedI have uploaded a preliminary patch for this issue, however I have some questions about the general direction.
From what I see, if we remove the email sending functionality, based on the existence of recipients, then we restrict contrib to add email sending functionality. The only way for contrib to send emails would be to add email sending in a form alter hook.
My suggestion would be to dispatch a specific event and to verify the existence of recipients in the subscriber for that event. This way we could easily add the storage functionality as well.
Any ideas?