Home › Forums › Quform WordPress › How to wrap Mailchimp API in conditional statement
- This topic has 2 replies, 2 voices, and was last updated 11 years, 9 months ago by jgibsat.
- AuthorPosts
- February 23, 2013 at 2:36 am #3077jgibsatParticipant
I followed the documentation for integrating mailchimp via their API and it worked like a charm. My issue is that I would like to add the mail list opt-in to the end of an unrelated survey form on my site. If I add the code supplied in the documentation here to my functions.php file, it will add every respondent to the survey to my mailchimp list regardless of their answer to that final question. (I understand that is provided for the case of a simple sign up form.)
The final question says something along the lines of “Would you like to receive our newsletter via email?”
My question is probably simple. How do I wrap the sample code provided in the documentation to only run the post process mytheme_save_to_mailchimp function when the user selects “yes”?
Again, the question is presently set up as a multiple choice radio button with the only two options being “Yes” and “No”. The unique ID is iphorm_1_57
P.S.: This may be something to consider adding to your documentation as it seems to be a pretty common use case. I’m not complaining, though. Simply my two cents.
February 24, 2013 at 10:28 am #3087AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
February 24, 2013 at 9:33 pm #3093jgibsatParticipantWorks perfectly. Thanks!
- AuthorPosts
- You must be logged in to reply to this topic.