Reviewed & tested by the community
Project:
Webform Mailchimp
Version:
7.x-4.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Dec 2016 at 22:15 UTC
Updated:
22 Feb 2022 at 00:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
daniyar.seferov commentedSame patch with pre-built option list of Mailchimp groups [list_name]: [group_name]
Comment #3
AlejandroSalinas9294 commentedComment #4
baysaa commentedThe patch at #2 works. Adds a nice mailchimp interest groups "Pre-build option list" to a Webform "Select options" type form component.
The only thing for me was that our organisation uses a lot of hidden interest groups, and the mailchimp_get_lists() function skips "hidden" interest groups which was not ideal for my use-case. The only way to change that was for me to copy the mailchimp_get_lists() function and paste it into this module as webform_mailchimp_get_lists(), and remove the logic to skip hidden interest groups.
I could've added this as a configuration, but this module doesn't have any config forms at the moment, and making a whole new interface just for 1 checkbox seemed like an overkill, so I'm just going to continue using my own patch for my own use-case and not post it here.
Comment #5
millionleaves commentedPatch in #2 works for me, and the "Pre-built option list" is very handy. I don't have any hidden interest groups on this particular site.
I'm assuming the interest group IDs are now required (by the Mailchimp API) for interest group fields to function. I'm not sure where I would have obtained those IDs from without this patch. Would be good to see it committed, and have some instructions on how to use the Pre Built Option" feature documented on the main module page.
Comment #6
achtonThe patch in #2 was not formatted as a p1 patch, so adding an updated patch here which applies cleanly. No change otherwise.
Comment #7
d.bipes commentedBaysaa,
Do you mind sharing the code you changed to do this?
Comment #8
meez commentedI applied patch #2 and I can see the file
webform_mailchimp.modulehas been changed. But it looks like on the Webform configuration page I don't see any changes. I also get this error:Status code 400. "400: Invalid Resource - Invalid interest ID: '77927'."?In webform_mailchimp field configuration I have (see attachment):
Mailchimp merge fields:
Mailchimp interests fields:
Gender|field_sexeIn webform component radio buttons
field_sexeI have (see attachment):Man
Woman
What I am doing wrong here?
Comment #9
johanvdr commentedI see in Comment #2 that a pre-build list can be build with Interest Groups available in the checkbox/dropdown component. That works ok. Is that all you need?
The pre-build list gets the key/value pairs.
Do you still need to do add anything than to Mailchimp interests fields in the webform mailchimp component (or is that already taken care off)?
Comment #10
branram commentedI've tried rolling the two versions of this patch in #2 and #6 but neither seem to be populating any interest group lists in the mailchimp field webform component settings. The "Mailchimp interests fields" still an open text area field. And unfortunately since Mailchimp decided to sunset their developer playground, I don't have an easy way to manually find the group id I need. I'm not sure if I'm doing something wrong or if there have been new requirements from Mailchimp since this patch was created.