The following is showing an example how you can use the Mailchimp form field to add customers to your Mailchimp lists.
First of all you need to install drewn's Mailchimp API, if this bundle is missing the Mailchimp Fieldtype won't be available.
{
"require": {
"drewm/mailchimp-api": "^2.2"
}
}
or
composer require drewm/mailchimp-api:^2.2
Add the following config to config/packages/sulu_form.yaml
:
sulu_form:
mailchimp_api_key: "<YOUR_API_KEY>"
It is recommended to store the api key as environment variable see Symfony Docs.
To change the subscribe status from subscribed
to pending
you need to configure the following:
sulu_form:
mailchimp_subscribe_status: "pending"
Account -> Extras -> Api Keys (create new / use existing)
or
https://us14.admin.mailchimp.com/account/api/
- Did you install the bundle?
- Did you added an Api-Key?
- Did you create a list what can be shown in the fieldtype?