I have a react app that I would like to add mailchimp signup form to. I am building a custom signup form and have user sign up by entering their first and last name and email. I
Like @marco-gaspari, I also ran into a lot of issues with this. My answer is a variation of theirs, but with some tweaks that, for me, were necessary to make it work.
In addition to switching post
at the end of the action
url to post-json
and including the c
attribute equal to ?
(in addition to the u
and id
attributes from the original url; all of which I chose to incorporate as hidden
input fields), I also had to redirect the output to a hidden . Otherwise, a new page opened with the json response.
This may have been due to my using a custom form; but for others also using custom Mailchimp signup forms, this solution may be helpful.