Check if email is on MailChimp list [RESOLVED]

I’m trying to implement this:

8. Check if email is on Mailchimp list

The following example shows how you return an error if the email is already on a Mailchimp list.

And my logs are saying this: (no list ID)
2020-12-16 9:40:53.823128 - DEBUG --> GFMailChimp::process_feed(): Subscriber tags successfully updated.
2020-12-16 9:40:53.823240 - DEBUG --> GFFeedAddOn::maybe_process_feed(): Marking entry #130 as fulfilled for gravityformsmailchimp
2020-12-16 9:41:32.907854 - DEBUG --> GFMailChimp::initialize_api(): Validating API Info.
2020-12-16 9:41:33.129586 - DEBUG --> GFMailChimp::initialize_api(): Mailchimp successfully authenticated.
2020-12-16 9:50:04.233032 - DEBUG --> gform_field_validation: running.
2020-12-16 9:50:04.233973 - DEBUG --> gform_field_validation: aborting; no list id.

Is this code grabbing the list ID from the form settings? Is this something that needs to be manually set? I tried adding my list ID but it’s still giving this error.

Thanks in advance!

The code does expect the form to have a Mailchimp feed configured so it can get the list id from that feed.

If you don’t want to configure a feed you can change $list_id = rgars( $feeds, '0/meta/mailchimpList' ); to $list_id = 'replace_this_with_the_id_of_the_mailchimp_list';

1 Like

Thanks Richard! I do have a feed configured, but it’s not recognizing it. Adding the list ID manually does work, for anyone else coming across this thread.

Super cool feature - thanks again.

1 Like