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.
We recently made the move from contact forms to webform on D8. The primary reason for this was the mailchimp support for webforms. We have a webform set up to use the mailchimp handler and is successfully subscribing users to the list. However, we would also like to be able to assign users to an interest group. In D7, you could use values from a select list to assign a user to the corresponding interest field. Is this possible in D8 or is there a workaround that produces similar results?
Comment | File | Size | Author |
---|---|---|---|
#5 | 2851273-5.patch | 1.73 KB | johnhanley |
Comments
Comment #2
johnhanley CreditAttribution: johnhanley as a volunteer commentedAttached patch is a first attempt to implement Interest Group support.
Comment #3
johnhanley CreditAttribution: johnhanley as a volunteer commentedPatch Notes
You must first select a list and save the handler. Subsequent handler edits will expose the corresponding Interest Groups (if any) in a fieldset below the other form elements. The Interest Groups are available to administrators only and meant to be used for default values when adding a subscription.
This patch is a work in progress. The next enhancement could perhaps be the dynamic display of Interest Groups for the selected list without having to save and re-edit the form.
Comment #4
johnhanley CreditAttribution: johnhanley as a volunteer commentedComment #5
johnhanley CreditAttribution: johnhanley as a volunteer commentedUpdated patch includes Interest Group configuration parameter in mailchimp_subscribe().
Comment #6
johnhanley CreditAttribution: johnhanley as a volunteer commentedComment #7
hanoiiNice patch. I actually did differently and then found this and fall back to this.
This is also included in #2883538: Several improvements / Request for co-maintainership, slightly modified, among other features. If possible a try of that patch could help get most features in.
Comment #8
hanoiiCommitted in the parent issue.