Contact form 7 only email field uploading to MC.
-
Hello,
I have an issue uploading fields beyond the email address to Mailchimp. Please see the background below and further down the email, a dump of data sent in the api call which explains the issue. I can get around the issue by using FNAME instead of NAME, but no other fields work:
Background:
I can get the email address from my contact form 7 form into MC on its own (API call is working fine). However, if I try to add a NAME field to it, it fails with the following message in your log (NAME is mandatory in MC and in my form):[2016-02-09 08:10:22] ERROR: Contact Form 7 > MailChimp API Error: NAME must be provided – Please enter a value
My Contact 7 form is as follows:
<p>
<label for=”name”>Full Name</label>
[text* mc4wp-NAME]
</p>
<p>
<label for=”email”>Email</label>
[email* mc4wp-EMAIL]
</p>
<p>
<label for=”message”>Message</label>
[textarea* message id:message]
</p>
[mc4wp_checkbox]
<p>
[submit “Send”]
</p>I’m running WP 4.4.2, MailChimp For WordPress 3.1.1, and Contact Form 7 plugin 4.3.1
Debug info
————————————-I did a dump of the $data array in the subscribe function (class-api.php) as I can’t debug remotely. The data looks like this for the form above (I have xxx’d out any value that might compromise privacy). It is sending FNAME instead of the NAME field I specified. Is this a bug?:
Array
(
[id] => xxxxxxxxxxx
[email] => Array
(
[email] => xxxxxxxxxxxxxxxxx
)[merge_vars] => Array
(
[EMAIL] => xxxxxxxxxxxxxxxx
[FNAME] => MyName
[OPTIN_IP] => xxxxxxxxxxxxxxx
)[email_type] => html
[double_optin] => 1
[update_existing] => 0
[replace_interests] => 0
[send_welcome] => 0
)I tried to add an additional field to the form called “mc4wp-INFO” and created the additional field in my mailchimp list. But nothing came through. I had WP dump the data again and it looks identical to the above–almost like it doesn’t find the other fields.
Please help when you have a moment, thanks.
- The topic ‘Contact form 7 only email field uploading to MC.’ is closed to new replies.