• I have had a persistent problem with “Merge Variables Included” not working.

    By this I mean: when I click in the box indicating that I wish a non-required field be included in the form, it was not being included.

    Previously I screwed around making everything required.

    Today, after finally upgrading to 1.2.9 I fixed it in the php.

    I changed the code at line 86 of mailchimp_widget.php:

    foreach($mv as $var) {
        $opt = 'mc_mv_'.$var['tag'];
        if (!$var['public'] && get_option($opt) != 'on') {
           echo '<div style="display:none;">'.mailchimp_form_field($var, $num_fields).'</div>';
        } else {
    	echo mailchimp_form_field($var, $num_fields);
        }
    }

    I grabbed the code from a foreach loop used to count fields (line 73)

    Don’t know if this is the best fix. But (knock on wood) it is working for me at the moment.

    https://www.ads-software.com/extend/plugins/mailchimp/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey there!

    Would you mind providing us with a little bit more information about the issues that you were running into previously? It sounds like when trying to include a non-required field, for some reason the plugin wasn’t adding that to your form, correct?

    Were there any particular field types that weren’t cooperating? For instance, text fields over dropdowns or radio buttions? I haven’t been able to replicate this same behavior on my end of things, however, if you have a fix in place, that’s cool too!

    Let us know if we can help with anything else. ??

    Cheers

    Thread Starter gxxaxx

    (@gxxaxx)

    It was a text field. Last name actually.
    My fields are:
    email
    first
    last hidden, not required
    source hidden, not required

    But I think the code more or less demonstrates the issue.

    With a simple test on if (!$var[‘public’]), the only controller for display not being none is to use the visible and not-visible attribute. At least that is what it looks like to me.

    The option is not being considered at this point. So near as I could tell the option was having no control. Of course I could be misreading the nature of $var[‘public’]. I thought it was only controlled by the database definition and not wordpress options.

    Hey again!

    Just wanted to circle back around to this issue.

    When the field is marked as “hidden” from the MailChimp side of things, we won’t display that on any form — hosted or through this plugin. However, you’ve got a workaround going on here, so that certainly works too!

    Our other suggestion would be to go into the form and temporarily mark it as “visible”. Then, update your List Settings in the plugin (so that the field becomes public). Because the form won’t update, automatically, you could go back into your MailChimp list and mark it as “hidden” again, but still have it visible on the form in WordPress.

    Cheers!

    Thread Starter gxxaxx

    (@gxxaxx)

    Thanks for the alternate solution.
    That can definitely work.

    I suppose to round out the situation, it might be a good idea in the admin panel to not list the hidden fields with a checkbox to include in the form.

    You could test for hidden and just not put the checkbox and instead say something about hidden with a link to some help on what and why etc.

    At the moment, one is allowed to check the box indicating that you want a hidden field to show in the form…. and, well it can’t.

    Unless you want to intentionally tease the users ??

    Hey again!

    I totally see the logic there. ??

    We appreciate the feedback!

    Cheers

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: MailChimp List Subscribe Form] Fixing "Merger variables"’ is closed to new replies.