Hello,
Thanks for reaching out to us.
Can you please share the exact code you have used to add the “Name” field to “Top Bar”? Also, please share with us the URL of your website where we can test the form.
Hi Harish,
I used this code :
add_action( ‘mctb_before_submit_button’, function() {
echo ‘<input type=”text” name=”NAME” placeholder=”Your name” />’;
});
add_filter( ‘mctb_data’, function( $vars ) {
$vars[‘NAME’] = ( isset( $_POST[‘NAME’] ) ) ? sanitize_text_field( $_POST[‘NAME’] ) : ”;
return $vars;
});
But, when i submit the form, i dont have the name field added on my mailchimp list. Just the email.
My website : https://lushy.fr
I want to display the first name on my list.
This exact same thing is happening to me; I replaced the field name with the correct merge tag (FNAME) and still nothing.
Hello,
Can you please go to the “MailChimp for WP > Others” page and share with us any errors there?
Please make sure to remove any sensitive information before sharing the logs.
Plugin Contributor
Lap
(@lapzor)
Since there have been no replies for awhile I will now mark this topic as “resolved”. If you are still experiencing this issue or you have a similar problem, please create a NEW topic. Thank you!
I’m encountering this issue as well. I’ve used the functions.php code mentioned above, but the name is not transferring to my mailchimp list.
Hello @wooq123,
Please create a new support request so we can assist you.