Title: Gravity forms fields integration?
Last modified: February 25, 2021

---

# Gravity forms fields integration?

 *  Resolved [nowton](https://wordpress.org/support/users/nowton/)
 * (@nowton)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-fields-integration/)
 * Does MC4WP map fields to merge tags like first and last name, or is that not 
   an option?

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Lap](https://wordpress.org/support/users/lapzor/)
 * (@lapzor)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-fields-integration/#post-14104660)
 * The problem with Grafity forms in this regard is that it generates field names
   sort of randomly, such as name=”input_4″ so it’s hard for MC4WP to know what 
   field is what.
 * The only way to do it is if you manually map those field names (you can get them
   via “right click > inspect” when you view the form) to the correct MailChimp 
   fields with some custom code.
 *     ```
       add_filter( 'mc4wp_integration_gravity-forms_subscriber_data', function( MC4WP_MailChimp_Subscriber $subscriber ) {
       $subscriber->merge_fields[ "FNAME" ] = sanitize_text_field( $_POST['input_2'] );
       $subscriber->merge_fields[ "COUNTRY" ] = sanitize_text_field( $_POST['input_4'] );
       return $subscriber;
       });
       ```
   
 * This example would map input_2 to FNAME and input_4 to the MailChimp field COUNTRY.
 * Hope that helps. If you have any questions, please let me know!

Viewing 1 replies (of 1 total)

The topic ‘Gravity forms fields integration?’ is closed to new replies.

 * ![](https://ps.w.org/mailchimp-for-wp/assets/icon-256x256.png?rev=1224577)
 * [MC4WP: Mailchimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailchimp-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailchimp-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailchimp-for-wp/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Lap](https://wordpress.org/support/users/lapzor/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-fields-integration/#post-14104660)
 * Status: resolved