PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Mailpress users integration

  1. Hello,
    I am using MailPress for a client's Newsletter system and I want to take the emails from Gravity Forms on my site and insert them into the Mail Press user database. I am successfully gotten Mail Press to create a new entry when a form is submitted but it is not actually inputting the email and name which I have saved as custom fields. Can someone please take a look at this function, specifically the part that calls the custom fields, and let me know what is going wrong. Thanks!

    add_filter("gform_post_submission", "MailPress_add_user_form", 10, 2);
    function MailPress_add_user_form($post, $form) {
                $name = get_post_meta($post['post_id'], 'user_name', true);
                $email = get_post_meta($post['post_id'], 'user_email', true);
                MailPress::require_class('Users');
                $user_check = MP_Users::get_id_by_email($_REQUEST['cemail']);
                  if ($user_check == NULL) {
                $mp_user_id = MP_Users::insert($email, $name, md5(uniqid(rand(),1)),'active' );
                }
                }
    Posted 14 years ago on Friday October 22, 2010 | Permalink
  2. anyone?

    Posted 14 years ago on Sunday October 24, 2010 | Permalink
  3. I got it. Instead of calling the value of the custom fields, I got the info right out of the form

    $name = $_REQUEST['input_2'];
    			$email = $_REQUEST['input_28'];

    just need to change the input numbers for each form.

    Posted 14 years ago on Sunday October 24, 2010 | Permalink