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.

Pre-Populating Gravity Form with MailChimp subscription info

  1. Dale
    Member

    Hello - is there a way to pass MailChimp subscription info into a Gravity Form? On my EDIT PROFILE page I would like to know whether a user is already subscribed to my MailChimp list. If they are, the SUBSCRIBE? radio button will = YES, if not it will = NO.

    That way I can set up a conditional statement that if SUBSCRIBE? = YES it will pass along the user's information again and effectively sync the WordPress user database with the MailChimp database.

    That said, this theory does not work at all if MailChimp does not allow updates to their existing user records through the Register Add-On.

    I hope this question makes a bit of sense ;)

    Posted 5 years ago on Friday February 15, 2013 | Permalink
  2. To determine if a user is subscribed to your Mailchimp list, you will need to use the Mailchimp API to query and see if the email address is already subscribed.

    http://apidocs.mailchimp.com/

    If the email address is already subscribed, you can do whatever you want with the button (set it to yes, or no as appropriate.) To change the default selected radio button, you would use the gform_pre_render filter.

    http://www.gravityhelp.com/documentation/page/Gform_pre_render

    You would use the Mailchimp API in your function hooked to gform_pre_render to find out if the email address of the user is already subscribed.

    Mailchimp will allow updates to existing users when using the Gravity Forms Mailchimp Add-on. If the user is already subscribed, their record will be updated.

    Posted 5 years ago on Saturday February 16, 2013 | Permalink