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.
Problem/Motivation
We have plans for contact module in contrib, in contact_storage module (see https://groups.drupal.org/node/433803).
Some of these will require storage of settings per contact form.
Proposed resolution
Implement third party settings interface in contact module's contact form contact entity.
Remaining tasks
Do it
User interface changes
None
API changes
Additions
Comment | File | Size | Author |
---|---|---|---|
#9 | 2342551-contact-3rd-party.9.patch | 7.61 KB | larowlan |
Comments
Comment #1
larowlanComment #2
larowlanComment #3
jibranOver all I am RTBC on this issue but I don't know a lot about ThirdPartySettings.
Comment #4
Berdirthere should be a "contact_form_form" base form ID too, should save you two methods?
The schema for the pony is missing in the test module. You can test that pretty easily, there's a trait and a few lines of code that you copy & paste and it will automatically validate all the config of your test. See Drupal\config\Tests\DefaultConfigTest.
Comment #5
andypostMaybe adding this we could find an actual usage?
For example refactor "send a copy" or add "set a text" or path alias?
any reason to add dependency on node module?
Comment #6
BerdirActual use cases only make sense in third party modules, if we add something to core, it will just live in contact.module.
Yeah, that should be contact_form.third_party.[%key] :)
Comment #7
larowlanComment #8
BerdirWould be great to add the schema validation trait stuff to make sure this is actually working :)
Comment #9
larowlandone
Comment #10
andypostLooks great!
PS: would be great to update summary to point and example what this for could be needed
Comment #11
andypostPossible examples:
1) settings for advanced notifications and redirect #306662: Add redirect option to site-wide contact forms
2) rules integrations could mark contact for some special processing
Comment #12
larowlanOpt in or out of storage in contact storage module.
Opt out of email.
Comment #13
NikLP CreditAttribution: NikLP commentedI'd love to help on this one but the code is way out of my league. D8 is hard.
Comment #14
alexpottLooks good. Committed f48a467 and pushed to 8.0.x. Thanks!