Title: Interest Groups not being selected
Last modified: August 30, 2016

---

# Interest Groups not being selected

 *  Resolved [Bob Easton](https://wordpress.org/support/users/bobeaston/)
 * (@bobeaston)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/interest-groups-not-being-selected/)
 * plugin version 6.0.2.1
 * My list has two Interest Groups (potentially more coming later). I am attempting
   to construct a form that will update only one of those groups while leaving the
   others alone.
 * I added the desired interest group to the form builder, specified a “selection”
   value and tested. My test was for an existing list member who had some interest
   group values already set. Not only was the selection value not updated in the
   targeted group, **values already set in the other group were cleared.**
 * Related settings: Optin Settings > Update Existing Subscriber = Yes
    The Interest
   Group fields are also defined as “hidden” at MailChimp. I did not touch that 
   setting in Easy Forms.
 * Additional clue (and possible bug?)
    When initially adding an Interest Group 
   to the Form Builder, the top of the added Interest Group form shows a “Default
   Selection” choice of values.
 * After updating the form, reopening the Interest Group in the Form Builder no 
   longer displays the “Default Selection” choices. That part of the form is gone.
   Maybe that’s the reason no choice is actually being updated?
 * My goals are to:
    – accept new members on a list with specific Interest Group
   selections – update existing members on a list with specific Interest Group selections–
   have these updates NOT affect existing Interest Group values
 * Having studied the MailChimp API a little bit, I fear those goals aren’t possible.
   What say you?
 * [https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/](https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Contributor [Tracy Levesque](https://wordpress.org/support/users/liljimmi/)
 * (@liljimmi)
 * 🏳️‍🌈 YIKES, Inc. Co-Owner
 * [10 years, 10 months ago](https://wordpress.org/support/topic/interest-groups-not-being-selected/#post-6645313)
 * Hi Bob,
 * Thank you for reporting this.
 * We will test this out and get back to you.
    -Tracy
 *  Thread Starter [Bob Easton](https://wordpress.org/support/users/bobeaston/)
 * (@bobeaston)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/interest-groups-not-being-selected/#post-6645383)
 * BTW, this sounds very much like the add-on issue reported by gella2002 at the
   bottom of this thread: [https://wordpress.org/support/topic/multiple-forms-on-one-page-4?replies=15](https://wordpress.org/support/topic/multiple-forms-on-one-page-4?replies=15)
 *  Plugin Author [Evan Herman](https://wordpress.org/support/users/eherman24/)
 * (@eherman24)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/interest-groups-not-being-selected/#post-6645407)
 * Hi Bob,
 * To respond:
 * If you have interest groups assigned to a given group, let’s say 2 interest groups,
   and you only submit data for one of those interest groups – MailChimp takes that
   as you no longer wanting to be associated with the second interest group, thus
   why the data is cleared.
 * If you want to update one interest group while leaving the other, you’ll need
   to assign the two interest groups to the form and leave one hidden. The default
   value selected for the second interest group will have to be the previous value
   stored for that user for that interest group. If no data is sent for the second
   interest group, the group data is then removed from the user.
 * That issue with Gella2002 has been addressed and a patch was released in a previous
   release. I will report back here when I have some findings.
 * In regards to the default value input field showing up on interest groups – that
   should not be occuring. Those default value fields show up for specific field
   types (text, number, email etc).
 * It should not be showing up for interest groups and we will have to take a look
   into the issue a bit further. When we can locate the small bug, we will push 
   out an update. That fix will probably be implemented along with our other changes
   for v6.0.3:
    [https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/issues/353](https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/issues/353)
 * Thanks,
    Evan
 *  Thread Starter [Bob Easton](https://wordpress.org/support/users/bobeaston/)
 * (@bobeaston)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/interest-groups-not-being-selected/#post-6645413)
 * We seem to be miscommunicating … or I completely misunderstand how MailChimp 
   wants interest groups to be used. I am attempting to follow the “best practice”
   advice to have only one list and to divide the list for various reasons/purposes.
   Currently we have 3 lists to do what I’ll describe shortly. I’d like it to be
   one list.
 * MailChimp makes this nearly impossible by allowing only one native MailChinmp
   form per list. That is why I turned to your plugin, to have multiple forms per
   list. Maybe what I’m trying to do is impossible?
 * Scenario: when people join the list, they might be joining for one of three major
   reasons, to show interest and perhaps become be a member of our online school,
   or to show interest in a book, or to be enrolled for a book related give-away.
   The placement of the form determines the interest, not any specific indication
   on the form. All of the group values at MailChimp are marked “hidden,” so that
   the user doesn’t have to bother with them. The form’s placement determines the
   value. … on a school membership page for membership or on a book advertising 
   page for the book, etc.
 * At MailChimp, I have 2 groups associated with the list. They have these group
   names and values:
 * Member level:
    – prospect – free member – premium member
 * Book
    – newsletter – raffle
 * Let’s imagine that someone is already member, but not initially interested in
   the book newsletter, but at some point became interested. I want to offer that
   person a form that will add them to the Book group with the newsletter value 
   without affecting their existing Member level value. And when offering the form,
   I don’t know / can’t determine the value of their existing Member level, so I
   can’t submit it as part of the form.
 * Can this be done?
 * Regarding the other issue of how the Interest Group part of the form builder 
   behaves, I’ll defer. I can offer screenshots to illustrate.
 * Thanks!
    — Bob
 *  Plugin Author [Evan Herman](https://wordpress.org/support/users/eherman24/)
 * (@eherman24)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/interest-groups-not-being-selected/#post-6645417)
 * Hi Bob,
 * Can you provide me a link to one of your forms.
 * I guess it’s hard for me to explain why this wouldn’t be working as intended.
 * I will try to use the example you provided above as an explanation. From my understanding
   you have **two** hidden interest groups just below the form fields.
 * Those interest groups are **Member Level**, and **Book**.
 * If a user is currently a member (let’s say ‘**free member**‘), but not interested
   in a book then on your subscriber list you see them listed under subscribers,
   with the interest group ‘Free Member’ assigned to the ‘Member Level’ interest
   group and nothing assigned to the ‘Book’ interest group.
 * Now, let’s say they want to go back to update the details in the form and want
   to now select a book, while leaving their membership level untouched.
 * When the form is rendered, the form/MailChimp has no idea what membership level
   the user viewing the form is – so it will default to the first displayed radio
   button, in this case ‘Prospect’. If the form field is hidden, then the user who
   submits to form will then be re-assigned to the membership level, ‘Prospect’.
 * The **ONLY** way around this would be to display a form back to the user with**
   ONLY** the book level selectable (or pre-selected) – so that NO DATA related 
   to a membership level is submitted with the form.
 * Your other option, which is a bit more involved and would require a developer(
   unless your comfortable writing code). What you can do in this instance is on
   form submission fire off an API request to MailChimp to retrieve the current 
   users data, and only repopulate the data that you need to update.
 * —
 * In short, if you wanted to update one interest group while leaving the other 
   as is, the only simple solution would be to attach the field you want updated
   while excluding the interest group you want left alone.
 * My question to you, if a new user is signing up for your mailing list, but you
   have the member level and book interest groups hidden, how are you deciding what
   the member level is? Based on the page they are using the sign up from?
 * However, there is one parameter in the API request that allows you to completley
   replace interest groups associated with a given subscriber, or to simply add 
   them on to the existing ones. By default, the interest groups get replaced. You
   may want to try altering this parameter so that the interest groups are added
   onto, instead of replaced.
 * `replace_interests - bool - (optional) - optional flag to determine whether we
   replace the interest groups with the groups provided or we add the provided groups
   to the member's interest groups (optional, defaults to true)`
 * Here is the snippet of code that handles new subscribers to a mailing list:
    
   [https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/blob/master/plugin_core/public/partials/shortcodes/process/process_form_submission.php#L82-L90](https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/blob/master/plugin_core/public/partials/shortcodes/process/process_form_submission.php#L82-L90)
 * I recommend that you alter this bit of code to the following, and testing again–
   this may be a simple solution:
 *     ```
       $subscribe_response = $MailChimp->call('/lists/subscribe', array(
       			'api_key' => $api_key,
       			'id' => $list_id,
       			'email' => array( 'email' => sanitize_email( $_POST['EMAIL'] ) ),
       			'merge_vars' => $merge_variables,
       			'double_optin' => $optin_settings['optin'],
       			'update_existing' => $optin_settings['update_existing_user'],
       			'send_welcome' => $optin_settings['send_welcome_email'],
       			'replace_interests' => 0
       		) );
       ```
   
 * If you want to email me at [Evan@yikesinc.com](https://wordpress.org/support/topic/interest-groups-not-being-selected/Evan@yikesinc.com?output_format=md),
   I can alter some of the existing code and send over an altered version of the
   current plugin. If that does indeed help, we can implement a filter in that location
   to allow you to tweak the settings without altering the code base.
 * Let me know either way, I’m more than happy to work with you try and find a solution
   to your problem.
 * Thanks!
    Evan
 *  Thread Starter [Bob Easton](https://wordpress.org/support/users/bobeaston/)
 * (@bobeaston)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/interest-groups-not-being-selected/#post-6645426)
 * Thanks Evan,
    you said: “In short, if you wanted to update one interest group
   while leaving the other as is, the only simple solution would be to attach the
   field you want updated while excluding the interest group you want left alone.”
 * That is exactly what I was attempting to do: add the Book/newsletter value while
   leaving Member level alone. My test form contains only the field for the Book
   interest group and does not contain the field for the Member level interest group.
 * The results are that the newsletter value is not being set, and existing member
   level values are being cleared. It is as if no value was specified for either
   group and MailChimp cleared them both.
 * You can see the test form at the bottom of the rightmost column on this page:
   [https://www.marymaycarving.com/school-clone/](https://www.marymaycarving.com/school-clone/)
 * Next, I think you’ll tell me you see no interest group field for that form … 
   which leads to the second problem: the value choice for the interest group disappears
   upon editing.
 * Thanks again,
    — Bob
 *  Thread Starter [Bob Easton](https://wordpress.org/support/users/bobeaston/)
 * (@bobeaston)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/interest-groups-not-being-selected/#post-6645427)
 * You asked:
    “My question to you, if a new user is signing up for your mailing
   list, but you have the member level and book interest groups hidden, how are 
   you deciding what the member level is? Based on the page they are using the sign
   up from?”
 * Yes, exactly. Also behind the scene I am using a membership plugin that actually
   has more levels of membership than the ones shown in my example. As people subscribe,
   unsubscribe and move among the levels, that plugin adjusts the MailChimp Member
   Level value accordingly.
 *  Plugin Author [Evan Herman](https://wordpress.org/support/users/eherman24/)
 * (@eherman24)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/interest-groups-not-being-selected/#post-6645429)
 * Hi Bob,
 * I can’t seem to access the site. It seems to be hanging on loading and nothing
   ever renders.
 * Feel free to email me at the email above and I can send over a modified verison
   of the plugin for testing, and if workin I can roll things into the code base
   for ever one else.
 * Evan
 *  Plugin Contributor [Tracy Levesque](https://wordpress.org/support/users/liljimmi/)
 * (@liljimmi)
 * 🏳️‍🌈 YIKES, Inc. Co-Owner
 * [10 years, 10 months ago](https://wordpress.org/support/topic/interest-groups-not-being-selected/#post-6645482)
 * Hello Bob,
 * We just pushed out an update that fixes the Interest Group issue.
 * Thank you!
    -Tracy
 *  Thread Starter [Bob Easton](https://wordpress.org/support/users/bobeaston/)
 * (@bobeaston)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/interest-groups-not-being-selected/#post-6645493)
 * ***** PERFECT *****
    Thanks Evan, Thanks Tracy. THANKS for making the Interest
   Group options work exactly as expected!
 * BIG KUDOS for determination and first class support!
 * You can close this one while I go cook up other scenarios. 🙂
 * Very much appreciated,
    — Bob

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Interest Groups not being selected’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/yikes-inc-easy-mailchimp-extender_a1c7e5.
   svg)
 * [Easy Forms for Mailchimp](https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/)
 * [Active Topics](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/reviews/)

 * 10 replies
 * 3 participants
 * Last reply from: [Bob Easton](https://wordpress.org/support/users/bobeaston/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/interest-groups-not-being-selected/#post-6645493)
 * Status: resolved