Title: help understanding integration
Last modified: August 30, 2016

---

# help understanding integration

 *  Resolved [fmmsf](https://wordpress.org/support/users/fmmsf/)
 * (@fmmsf)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/help-understanding-integration/)
 * Hi guys!
 * I’ve been using the latest version of this plugin flawlessly for the last weeks(
   thanks, Jesse Pearson!).
 * I think I’m ready to move to the “next level” and start integrating some of my
   forms’ fields into mailpoets’ subscriber list.
 * Some of the fields I want to map are ‘last name’ and ‘country’. Should I do it
   using the code on this page ([https://support.mailpoet.com/knowledgebase/plugin-form-integrate/](https://support.mailpoet.com/knowledgebase/plugin-form-integrate/))
   or will that conflict with this plugin?
 * Thanks!
 * [https://wordpress.org/plugins/mailpoet-contact-form-7/](https://wordpress.org/plugins/mailpoet-contact-form-7/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [jessepearson](https://wordpress.org/support/users/jessepearson/)
 * (@jessepearson)
 * Automattic Happiness Engineer
 * [10 years, 10 months ago](https://wordpress.org/support/topic/help-understanding-integration/#post-6580455)
 * You’re welcome 🙂
 * I believe this plugin was originally created to bridge a small gap between contact
   forms and the newsletter sign up, and as such, it has little functionality. I
   personally got involved because it wasn’t working for my client and it was easier
   to fix this plugin than it was to write my own.
 * That being said, here’s the code that gets the form info for name and email to
   post over to MailPoet:
 *     ```
       // set defaults for mailpoet user data
       	$user_data = array(
       		'email'	 => "",
       		'firstname' => "",
       		'lastname'  => ""
       	);
   
       	// get form data
       	$user_data['email']	 = isset($posted_data['your-email']) ? trim($posted_data['your-email']) : '';
       	$user_data['firstname'] = isset($posted_data['your-name']) ? trim($posted_data['your-name']) : '';
       	if (isset($posted_data['your-first-name']) && !empty($posted_data['your-first-name'])) {
       		$user_data['firstname'] = trim($posted_data['your-first-name']);
       	}
       	if (isset($posted_data['your-last-name']) && !empty($posted_data['your-last-name'])) {
       		$user_data['lastname'] = trim($posted_data['your-last-name']);
       	}
       ```
   
 * It looks like it only supports three fields, first name, last name and email.
 * If `[your-name]` is used in the form, then it takes that and uses that as the
   first name in MailPoet and last name is left blank.
    If `[your-first-name]` is
   used, it takes that for the first name in MailPoet. If `[your-last-name]` is 
   used, it takes that for the last name in MailPoet. Lastly, if `[your-email]` 
   is used, it takes that for the email address in MailPoet.
 * I know that doesn’t completely solve your issue, but hopefully it helps you get
   at least the names into MailPoet.

Viewing 1 replies (of 1 total)

The topic ‘help understanding integration’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/mailpoet-contact-form-7_e2ebea.svg)
 * [Mailpoet - Contact Form 7 Integration](https://wordpress.org/plugins/mailpoet-contact-form-7/)
 * [Support Threads](https://wordpress.org/support/plugin/mailpoet-contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/mailpoet-contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailpoet-contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailpoet-contact-form-7/reviews/)

## Tags

 * [email](https://wordpress.org/support/topic-tag/email/)
 * [last name](https://wordpress.org/support/topic-tag/last-name/)
 * [tags](https://wordpress.org/support/topic-tag/tags/)

 * 1 reply
 * 2 participants
 * Last reply from: [jessepearson](https://wordpress.org/support/users/jessepearson/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/help-understanding-integration/#post-6580455)
 * Status: resolved