• Resolved rogeriodec

    (@rogeriodec)


    Even filling the “name” field, it’s not being imported to MailChimp.
    How to solve this?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hey Roger,

    Thanks for reaching out to us.

    Our integration with “WP Forms” plugin only finds the “Email Address” field. To add additional fields you will need custom code. Please check https://github.com/ibericode/mailchimp-for-wordpress/blob/master/integrations/wpforms/class-wpforms.php#L70 to see how the email address field is checked. You can use this filter to add support for more fields.

    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hey Roger,

    Please find an example code below to send the name field to MailChimp.

    add_filter('mc4wp_integration_wpforms_data', function($data) {
        $data['FNAME'] = $_POST['wpforms']['fields'][4];
        return $data;
    });

    You can add this code to the “functions.php” file located inside your active theme folder.

    Please make sure to change “FNAME” to match the field name in your MailChimp list.

    Thread Starter rogeriodec

    (@rogeriodec)

    It worked!
    I leave here the suggestion to include this function as an option in the plugin.
    Thank you.

    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hey Roger,

    It’s not possible to add this option in the plugin because using field type function, it’s easy to find email address field. However, all other fields have the same field type, i.e. “text”.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Not adding name on Mailchimp’ is closed to new replies.