To send Webflow form submissions directly to Mailchimp and keep the form submission behavior seamless with AJAX, you’ll need to bypass Webflow’s form handling and connect the form to Mailchimp’s API or embedded form endpoint.
https://<dc>.list-manage.com/subscribe/post?u=XXXXXXX&id=YYYYYYY
tag and add custom JavaScript.
&c=?
to the URL to make it a JSONP request since Mailchimp doesn’t support CORS.Important Notes:
Use this pattern (with your real action URL):
<script> $(document).ready(function() { $('#your-form-id').submit(function(e) { e.preventDefault(); var $form = $(this); var url = 'https://<dc>.list-manage.com/subscribe/post-json?u=XXXXXX&id=YYYYYY&c=?'; $.ajax({ type: 'GET', url: url, data: $form.serialize(), dataType: 'jsonp', contentType: "application/json; charset=utf-8", success: function(data) { if (data.result === 'success') { // Success response alert('Thank you for subscribing!'); } else { // Error response alert(data.msg); } }, error: function(err) { alert('Could not connect to the server. Please try again later.'); } }); }); });</script>
To populate your Mailchimp list using Webflow with AJAX:
GET
+ jsonp
.