• Resolved klaudiom

    (@klaudiom)


    Hello,

    For some reason the Name field in mailchimp top bar is not being sent to the Mailchimp list. The email field gets captured and sent correctly but when I look on the list the name field is empty.

    I’ve added this code for the name field to appear

    add_action( 'mctb_before_email_field', function() {
        echo '<input type="text" name="NAME" placeholder="Your name" />';
    });
    
    add_filter( 'mctb_merge_vars', function( $vars ) {
        $vars['NAME'] = ( isset( $_POST['NAME'] ) ) ? sanitize_text_field( $_POST['NAME'] ) : '';
        return $vars;
    });

    How can I fix this ?

    Thanks

    WordPress 4.4.1 , Mailchimp Top Bar 1.2.7, Mailchimp 3.1.1

    https://wordpress.org/plugins/mailchimp-top-bar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Having the same problem. Anyone found a solution to this?

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hi both,

    The code definitely looks good but are you sure that the selected MailChimp list has a field named “NAME”?

    Plugin Contributor Lap

    (@lapzor)

    Since there have been no replies to this topic for awhile I will now close this ticket as resolved.

    If you still have a problem or you have a similar problem as posted above, please open a NEW topic. Don’t forget to include a link to a page where we can see the issue whenever possible. Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Name not being sent to Mailchimp after submit’ is closed to new replies.