Mailchimp for FormIt

Package for subscribing users in Mailchimp lists using FormIt.

Creator: Sterc Online Agency (sterc)

Need help installing this extra?

About Mailchimp for FormIt

This extra adds subscribers to Mailchimp lists using FormIt and the Mailchimp API. It adds a snippet for retrieving Mailchimp lists in a single select TV and a FormIt hook for subscribing Mailchimp users to the list provided in the pages Template Variable.

Information

Released
November 23, 2018

Supported Database
MySQL

License
GPLv2

Supported Versions
2.5 - <2.6

Downloads
2,853

Instructions

Package for subscribing users in Mailchimp lists using FormIt.

Adds a snippet for retrieving Mailchimp lists in a single select TV and a

FormIt hook for subscribing Mailchimp users to the list provided in the pages Template Variable.

Functionalities

* FormIt hook for subscribing users to Mailchimp lists based on TV value

* MailChimpGetLists: Snippet for creating a select list of MailChimp lists.

How to get set up

* Add MailChimp API Key in systemsettings: mailchimpsubscribe.mailchimp_api_key

* Create a new single select TV variable and set the input option values to:

    @EVAL return $modx->runSnippet('MailChimpGetLists');

* Add MailChimp List ID TV in systemsettings: mailchimpsubscribe.list_tv

* Add MailChimpSubscribe to your FormIt hooks

* Add in your chunk the placeholder fi.error.mailchimp, which holds all MailChimp error messages.

* Add a field called newsgroup, if the value of this field is set to yes, the user will be subscribed to the mailchimp list.

Properties

* mailchimpListId: Mailchimp List ID.

* mailchimpFields: Configuration containing the field mapping between FormIt form and Mailchimp merge tags.

* mailchimpSubscribeField: Field name to use for subscribing users to mailchimp.

* mailchimpSubscribeFieldValue: Field value to use for subscribing users to mailchimp.

Example usage

[[!FormIt?

&hooks=`MailChimpSubscribe,redirect`

&validate=`email:email:required,name:required`

&redirectTo=`[[++page_newsletter_thanks]]`

&validationErrorMessage=`true`

&store=`1`

&submitVar=`newsletter-submit`

&mailchimpListId=`12345678abc`

&mailchimpFields=`name=FNAME,email=EMAIL`

&mailchimpSubscribeField=`newsletter`

&mailchimpSubscribeFieldValue=`1`

]]

New in 1.0.1-pl

MailChimpSubscribe 1.0.1-pl==============

  • Added options for dynamic mapping of merge tags and FormIt fields.
  • Limit mailchimp lists to 100 results instead of 10 and sort by list name asc.

MailChimpSubscribe 1.0.0-pl==============First release of this Extra.

Current releases

1.2.4-pl
View | Download
January 4, 2022
2.0 - Current

1.2.3-pl
View | Download
July 8, 2021
2.0 - Current

1.2.1-pl
View | Download
April 5, 2019
2.5 - Current

1.0.1-pl
View | Download
November 23, 2018
2.5 - <2.6