Forum
MailChimp / Forms App double-duty and optional opt-in
I'm using the Forms App for a simple contact form. I'd like to add a checkbox which, if checked, submits the form not only to the Forms App, but also adds the email field to the client's MailChimp list. The Forms App and MailChimp apps are installed, setup and running smoothly. I'm following the double-duty subscribe and contact form example in the docs, but I don't see any options in the docs or forums about how to make an opt-in to the MailChimp list optional for an end-user. Is that possible?
Thanks!
Use
mailer="confirm_subscribe"
like this:Thanks Drew. The form submits successfully to the Forms App, but not to the Mailchimp app or the Mailchimp website, where the entry isn't added. I can't find what I'm doing wrong in the code.
Here's my form (with all the Foundation layout code stripped out for easier reading).
<perch:form id="contact" app="perch_mailchimp perch_forms" double-optin="false" send-welcome="false">
<perch:content id="intro" type="textarea" label="Form introduction" size="xs" editor="redactor" html="true" size="m" divider-before="Contact Form" />
<perch:error for="name" type="required">Please add your name</perch:error> <perch:input type="text" id="name" required="true" label="Name" placeholder="Your Name" mailer="NAME" />
<perch:error for="email" type="required">Please add your email address</perch:error> <perch:input type="text" id="email" required="true" label="Email" placeholder="Your Email" mailer="EMAIL" />
<perch:error for="phone" type="required">Please add your phone number</perch:error> <perch:input type="text" id="phone" required="true" label="Phone" placeholder="Your Phone" mailer="PHONE" />
<perch:error for="zip" type="required">Please add your zip code</perch:error> <perch:input type="text" id="zip" required="true" label="Zip Code" placeholder="Your Zip Code" mailer="ZIP" />
<perch:error for="subject" type="required">Please choose your subject</perch:error> <perch:input type="select" id="subject" options="Choose your subject...,Where to Buy, Product Usage, Interest in Selling Kellogg and/or G&B Organic Products, Rebates, Other" />
<perch:error for="message" type="required">Please add a message</perch:error> <perch:input type="textarea" id="message" required="true" label="Message" placeholder="Your Message" />
<perch:error for="message" type="required">Join our mailing list?</perch:error> <perch:input type="checkbox" value="1" id="confirm" mailer="confirm_subscribe" /> Would you like to join our mailing list?
That looks like it should work. If you add debug to the page and submit the form, what does it output?
So if I visit the page with the form the debug on, I see this:
Is this Perch 2.8.4?
Perch 2.8.2.
Does the issue persist with the current version?