Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can this be used with Mailchimp's Contact Form / Inbox? #92

Open
modulareverything opened this issue May 12, 2021 · 4 comments
Open

Can this be used with Mailchimp's Contact Form / Inbox? #92

modulareverything opened this issue May 12, 2021 · 4 comments

Comments

@modulareverything
Copy link

They give a similar endpoint for their contact forms so I'm wondering if this is possible using this plugin?

@modulareverything
Copy link
Author

Thought I'd update this as I'm trying things out.

I tried adding the contact form endpoint in place of the default mailing list endpoint, like this (where my_user_id and contact_form_id are the proper ids from the endpoint):

    addToMailchimp(
      data.contactEmail,
      {
        NAME: data.contactName,
        SUBJECT: data.contactSubject,
        MESSAGE: data.contactMessage,
      },
      'https://us1.list-manage.com/contact-form?u=my_user_id&form_id=contact_form_id'
    );

This doesn't work and gives me some errors I'm unsure about:

Uncaught (in promise) Error: Timeout
    at eval (index.js:63)

and also a "CORB" error (never heard of this):

index.js:94 Cross-Origin Read Blocking (CORB) blocked cross-origin response https://us1.list-manage.com/contact-form?u=my_user_id&form_id=contact_form_id&EMAIL=hey%40chrish.design&NAME=Chrish&SUBJECT=Testing%20Subject&MESSAGE=My%20message%20would%20go%20here&c=__jp2 with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.

@modulareverything
Copy link
Author

I tried adding this into the index.js file of this plugin to see if contact-form needed to be contact-form-json the same as post does...

    if(endpoint.includes('contact-form')) {
        endpoint = endpoint.replace(/\/contact-form/g, '/contact-form-json');
    } else {
        endpoint = endpoint.replace(/\/post/g, '/post-json');
    }

but nah, no joy here either!

@CaptainHaider
Copy link

did you find any solution?

@LucyMac
Copy link

LucyMac commented Oct 3, 2022

I was also hoping to use this plugin with a contact form but I'm getting the CORB error. Does anyone have any tips / alternatives to suggest?

Thanks 🙏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants