Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

First name not transferring to Mailchimp list

$
0
0

Replies: 0

I want to capture the first name of subscribers and added the following code:

add_action( ‘mctb_before_email_field’, function() {
echo ‘<input type=”text” name=”FNAME” placeholder=”Name” />’;
});

add_filter( ‘mctb_data’, function( $vars ) {
$vars[‘FNAME’] = ( isset( $_POST[‘FNAME’] ) ) ? sanitize_text_field( $_POST[‘FNAME’] ) : ”;
return $vars;
});

However, it doesn’t transfer the name to my Mailchimp list. I don’t understand what is wrong and why I have to mess with the code to do something this simple.


Viewing all articles
Browse latest Browse all 59525

Trending Articles