Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Mailchimp API not being passed?

Started by Daniel Wrightson 5 years ago · 0 replies · 371 views
5 years ago

Not sure what's going on here but the Mailchimp plugin is throwing an error:

PHP
$mailchimp = new ErrorLoggingMailChimp(
       new MailChimp($this->grav['config']->get('plugins.mailchimp.api_key')),
       $this->grav['log']

Which looks to me like the Mailchimp API isn't being pulled in - but I've added it to the plugin settings - then, to be sure I've added it to the config file directly.

My form setup looks like this:

YAML
forms:
    RichiediGuida:
        fields:
            -
                name: Nome
                type: text
                label: 'Nome'
                placeholder: 'Il tuo nome'
            -
                name: Cognome
                type: text
                label: 'Cognome'
                placeholder: 'Il tuo Cognome'
            -
                name: email
                type: email
                label: Email
                placeholder: La mail (invieremo qui la tua guida gratuita)'
                validate:
                    required: true
                    message: 'Senza mail non possiamo inviarti la guida'
        buttons:
            -
                type: Submit
                value: 'Si, voglio la guida gratuita'
        process:
            save:
                fileprefix: contact-
                dateformat: Ymd-His-u
                extension: txt
                body: '{% include ''forms/data.txt.twig'' %}'
            mailchimp:
                required_fields: [email]
            email:
                subject: '[Richiesta Guida] {{ form.value.name|e }}'
                body: '{% include ''forms/data.html.twig'' %}'
            reset: true
            display: thankyou
---

Thanks for any help/ideas...

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 46 1 week ago
Plugins · by Xavier, 4 weeks ago
2 55 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1181 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 49 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 73 2 months ago