Name not being sent to Mailchimp after submit
-
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
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Name not being sent to Mailchimp after submit’ is closed to new replies.