Gravity Forms Mapping Form Fields
-
Hello,
I’m trying to map all my form fields to Mailchimp. Currently only the e-mail field is showing up in the submission in Mailchimp. I did some searching in the forums and was able to find some code to start with:
add_filter( 'mc4wp_integration_gravity-forms_subscriber_data', function( MC4WP_MailChimp_Subscriber $subscriber ) { $subscriber->merge_fields[ "FNAME" ] = sanitize_text_field( $_POST['input_1.3'] ); $subscriber->merge_fields[ "LNAME" ] = sanitize_text_field( $_POST['input_1.6'] ); $subscriber->merge_fields[ "ADDRESS" ] = sanitize_text_field( $_POST['input_8'] ); $subscriber->merge_fields[ "PHONE" ] = sanitize_text_field( $_POST['input_4'] ); return $subscriber; });
Originally I was using the gravity forms address field but read that it could cause issues and to switch to a regular text field. It looks like now only the phone number is coming through in Mailchimp. Could someone help me with what I could be doing wrong? Thank you.
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Gravity Forms Mapping Form Fields’ is closed to new replies.