I’m using Freeform and Mailchimp EE extensions and I’m coming across a problem.
I have a contact form with a checkbox, when if checked, it’s supposed to subscribe them to a MailChimp mailing list.
When the form redirects to the thank you page, I fire this code in the thank you page.
{exp:freeform:entries collection="Contact Form" orderby="date" sort="desc" limit="1"}
{if subscribe == "Yes"}
{exp:mailchimp_ee:subscribe api_key="xxxxxxxxxxxxxxxxxxxxxxxx" list_id="6339acac14" email_address="{email}" double_optin='yes'}
{/if}
{/exp:freeform:entries}It’s subscribing the users whether the check box is checked or not!
Is there a better way I can be doing this?