nerospec
Forum Replies Created
-
Forum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] Change field ID numbers to FNAME/LNAMEI tried a different code inserter. It seems to have removed the error, but the remapping is not working. Is this code correct?
// The problem with WPForms forms in this regard is that it generates field names that aren't always easy for our plugin to recognize. // You will have to inspect the source of the form to find field names (name="...") for each field and manually map them as such: add_filter( 'mc4wp_integration_wpforms_subscriber_data', function( MC4WP_MailChimp_Subscriber $subscriber ) { //Become a Distributor if($_POST['wpforms[id]'] == "7408") { $subscriber->merge_fields[ "FNAME" ] = sanitize_text_field( $_POST['wpforms[fields][12][first]'] ); $subscriber->merge_fields[ "LNAME" ] = sanitize_text_field( $_POST['wpforms[fields][12][last]'] ); $subscriber->merge_fields[ "COMPANY" ] = sanitize_text_field( $_POST['wpforms[fields][4]'] ); $subscriber->merge_fields[ "PHONE" ] = sanitize_text_field( $_POST['wpforms[fields][11]'] ); } return $subscriber; });
Forum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] Change field ID numbers to FNAME/LNAMEThe form submits fine. Just no field remapping
Forum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] Change field ID numbers to FNAME/LNAMEIt seems that the form submitted and the double opt-in went through. It’s just the page loading a white screen with an error
Forum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] Change field ID numbers to FNAME/LNAMEI seem to be getting this error
Warning: Undefined array key "wpforms[id]" in /usr/www/users/nerosnmxpd/sk.nerospec.com/wp-content/plugins/code-snippets/php/snippet-ops.php(505) : eval()'d code on line 7 Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/nerosnmxpd/sk.nerospec.com/wp-content/plugins/code-snippets/php/snippet-ops.php(505) : eval()'d code:7) in /usr/www/users/nerosnmxpd/sk.nerospec.com/wp-includes/pluggable.php on line 1421 Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/nerosnmxpd/sk.nerospec.com/wp-content/plugins/code-snippets/php/snippet-ops.php(505) : eval()'d code:7) in /usr/www/users/nerosnmxpd/sk.nerospec.com/wp-includes/pluggable.php on line 1424
Forum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] Change field ID numbers to FNAME/LNAMEPlease tell me if I am on the right path?
if($_POST['wpforms[id]'] == "7408") { $subscriber->merge_fields[ "FNAME" ] = sanitize_text_field( $_POST['wpforms[fields][12][first]'] ); $subscriber->merge_fields[ "LNAME" ] = sanitize_text_field( $_POST['wpforms[fields][12][last]'] ); $subscriber->merge_fields[ "COMPANY" ] = sanitize_text_field( $_POST['wpforms[fields][4][company]'] ); $subscriber->merge_fields[ "PHONE" ] = sanitize_text_field( $_POST['wpforms[fields][11][phone]'] ); }
Not sure if I’m writing the correct values at the end of the row.
Where does the value come from?Forum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] Change field ID numbers to FNAME/LNAMEThank you for helping me figure that out.
I might be pushing my luck, but do you by any chance know where to change the circled text in this image? https://imgur.com/JPbkKp6
It’s the heading name in the double opt-in that the client gets
Forum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] Change field ID numbers to FNAME/LNAMEI dont understand. So it wont add the person until they double opt-in? Is there no way to remove that?
Forum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] Change field ID numbers to FNAME/LNAMEThere is no double opt in option in the field settings for the Mailchimp field.
Forum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] Change field ID numbers to FNAME/LNAMEI changed the log to capture everything and it says it was successful… but it doesn’t add it to the list
[2022-10-10 14:23:18] INFO: WPForms > Successfully subscribed info@ma*******.co.za
[2022-10-10 14:24:08] INFO: WPForms > Successfully subscribed info@ma*******.co.zaForum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] Change field ID numbers to FNAME/LNAMEWhat I mean is, where in this code do I put the form id?
<?php // The problem with WPForms forms in this regard is that it generates field names that aren't always easy for our plugin to recognize. // You will have to inspect the source of the form to find field names (name="...") for each field and manually map them as such: add_filter( 'mc4wp_integration_wpforms_subscriber_data', function( MC4WP_MailChimp_Subscriber $subscriber ) { $subscriber->merge_fields[ "FNAME" ] = sanitize_text_field( $_POST['wpforms[fields][7][first]'] ); $subscriber->merge_fields[ "COUNTRY" ] = sanitize_text_field( $_POST['wpforms[fields][7][country]'] ); return $subscriber; });
Forum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] Change field ID numbers to FNAME/LNAMEIt’s only logging when the address already exists. When the address… there is no log. Even when I submit the form with the new email 2 or 3 times
Forum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] Change field ID numbers to FNAME/LNAMEI have added the checkbox and even that doesn’t add the email address. I want to try this code you suggested. I have a few different forms where the field ID is different each time. How do I specify the form id?