Forum

Thread tagged as: Question, Forms, MailChimp

Showing a custom value based on the Mailchimp app's API response

Hello,

I've got the Perch forms app going, have built a form, and have also linked my form into the Perch Mailchimp app. The form is submitting, saving its data in Perch, and is also subscribing the user to a Mailchimp list :)

I'd like to know if it's possible to show a custom response/error message to the user based on what's returned by the Mailchimp API.

For example with debug on I can see that a particular email address is already on the Mailchimp list:

[body] => {"type":"https://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/","title":"Member Exists","status":400,"detail":"test@test.co.uk is already a list member. Use PUT to insert or update list members.","instance":""}

Is there any way to access this response and make the form show a different message? The form app's built-in success and error fields are working perfectly, but I'd love to be able give the user a Mailchimp-specific response like "Thanks but you're already subscribed to this list".

Thanks,

Gareth

Gareth Jones

Gareth Jones 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I don't think there is a way to do that currently, no.

Ok, thanks for looking.