Extension - Email Forms with Mailchimp

Hi theme.co Team. I’ve created a list in Mailchimp with many fields. After creating and saving in Mailchimp, I come over to your extension and refresh the Mailchimp lists - this works fine and the new list shows up.

Now, I create a new email form. Email Form > Add New.

In this screen, when I go to “Custom Fields”, only 8 fields appear. There is no scroll box and no way to see the other fields I have in this mailchimp list. See attached screen shot for the example.

Please allow more than 8 custom fields in your list.

Thanks in advance,
Joe

Hello There,

Thanks for writing in! The custom fields which you can add in the form will depend and came from your lists. If in your list you have more custom fields, it will show up in there. The same thing would happen if you do not have a list yet, no custom field will display.

Hope this helps.

I’m afraid you didn’t understand the error. My MailChimp list has another 10 fields that are not displaying in the X email extension. Question 4, Question 5, etc. have all been truncated from the field selection list.

As you can see from my screen shot, it only shows 8 of the 18 fields that are in my MailChimp list. Please review again.

Regards,
Joe

Hi there,

It might be something related to the PHP Memory limit or the posts count in the settings. But I am not sure so we need your help to test those cases:

  1. Kindly increase your PHP memory limit using the guide below:

https://theme.co/apex/forum/t/troubleshooting-customizer/196 (Not Working or Showing a White Screen section.)

You may need to contact your hosting service provider to increase it from their side too.

  1. Go to Settings > Reading and increase the Blog Pages show at most option.

See if it works for you.

Thank you.

I made the changes to the php memory and update blog page limit, however neither have resolved the issue. It appears that this field is limited to 8 entries in the dropdown. I’ve tried debugging the .php but I’m a better css person that php…

Hi, @joebelluso!

Investigating your problem we discover that Mailchimp API defaults to 10 records while retrieving custom fields. Excluding the defaults FNAME and LNAME you got 8 - the limit you found.

We’ll release the fix soon, but you can manually do that in the meanwhile. Update to latest (2.0.2) version and open the file:

wp-content/plugins/tco-email-forms/email-mailchimp/functions/provider.php

On line 196, under the function retrieve_custom_fields, change from:

$result = $mc_api->get( "lists/{$list_id}/merge-fields" );

to:

$result = $mc_api->get( "lists/{$list_id}/merge-fields", array('offset' => 0, 'count' => 100) ) ;

Save the file. Now on Wordpress admin navigate to X (or Pro) -> Email Forms -> Mailchimp tab and hit Refresh button under Email Lists.

Now you’re able to see all your custom fields when you edit your forms.

Let us know if it works.

Thanks!

That worked just fine - thanks!

You prove to me (again!) that I need a lot more php training. :open_mouth:

Last quick question on email forms: This add-on will only post to the MailChimp list, correct? In other words, we should not expect this to create Wordpress users as subscribers, etc.?

Hi There,

Yes, that is correct.

Hope it helps