Code Monkey home page Code Monkey logo

Comments (5)

benjaminhoffman avatar benjaminhoffman commented on June 16, 2024

looking into this.

from gatsby-plugin-mailchimp.

benjaminhoffman avatar benjaminhoffman commented on June 16, 2024

Thanks for pointing this out @mikelax

I don't know if the Mailchimp API allows it. I can look into this.

In the meantime, got a moment to open a PR updating the README? I can merge this week.

from gatsby-plugin-mailchimp.

mikelax avatar mikelax commented on June 16, 2024

@benjaminhoffman sure will do. do you first want to merge #16 ?

from gatsby-plugin-mailchimp.

benjaminhoffman avatar benjaminhoffman commented on June 16, 2024

not sure if there is any way around this. open to suggestions.

from gatsby-plugin-mailchimp.

fantapop avatar fantapop commented on June 16, 2024

I fell into this issue as well. I think I have a work around which could potentially be integrated into the plugin. If I receive "captcha" back as the error, I manually build the URL for the popup window that is triggered in the normal mailchimp embedded form case. I can then open that popup and successfully fulfill the captcha and sign up the user. It's not a great user experience since they need to allow popups but its no worse than using that captcha otherwise. You may be able to load the url in an iframe on the page and allow the user to finish the flow there. The url for the pop up looks like this:

const { result, msg, params } = await addToMailchimp(this.state.email);
if (msg === 'captcha') {
    window.open(`https://<same domain used in plugin config>/subscribe/post?u=${params.u}&id=${params.id}&EMAIL=${encodeURIComponent(params.EMAIL)});
}

I haven't tried it with any of the additional fields that can be passed along as listFields but I expect they could be handled similarly.

EDIT:

I see the url is pretty much exactly the same one as I configured the plugin with. I'm not sure if doing it this way, cancels out some of the point of having the plugin if we know we have the captcha enabled, we could just open that url in a popup on form submit instead of calling addToMailchimp()

from gatsby-plugin-mailchimp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.