Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Follow-up to: #1825044: Turn contact form submissions into full-blown Contact Message entities, without storage
Problem
- Sent contact messages are not stored anywhere currently; they are only sent out via e-mail, without any track record (watchdog doesn't really count).
Goal
- Allow to store (and render) contact messages.
- Add Views support for contact messages.
Details
- Storing + listing + rendering contact messages should be straightforward for the site contact form.
- We'd need access permissions for CRUD, listing, and so on.
- For user contact form messages, we'd need per-account listings and additional access permissions.
Notes
- Doing this will also allow contact messages to be properly moderated, similar to how comments can be moderated.
Comments
Comment #1
sunComment #2
sunComment #2.0
sunUpdated issue summary.
Comment #3
larowlan#2289063: Change contact message entity to behave more like a normal entity adds a test module which does the storage, we could drop the _test suffix and be done for that bit.
Comment #4
andypostMessage entity needs access controller
access site-wide contact form
access permission is exactlyMessage::accessCreate($contact_form_id)
Comment #5
BerdirThe referenced issue landed, how do you want to continue?
We could start a sandbox or github project to convert the test module into a real module to start working on saving, viewing and listing the messages, unless someone already did that?
Comment #6
larowlanI'd like to discuss with @catch/@alexpott first, as this is clearly a feature.
But +1 to sandbox
Comment #7
barraponto CreditAttribution: barraponto commentedI'd be way more confortable if this feature was in contrib land. Are the hooks in place for this kind of extended feature?
Comment #8
larowlanSee contact_storage_test in core, which is proof of concept for test sake.
The idea is build in contrib for 8.0 and if it matures enough, propose for future point release.
Comment #9
larowlanSandbox is here https://www.drupal.org/sandbox/larowlan/2304799
Comment #10
larowlanNote http://drupal.org/project/contact_storage (for D8)
Comment #11
andypost