GithubHelp home page GithubHelp logo

vue-mailchimp-subscribe's People

Contributors

dependabot[bot] avatar hanspagel avatar philippkuehn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vue-mailchimp-subscribe's Issues

Is this working? Perpetual Loading

Hey!

Thanks for this package, I am currently seeing loading forever, and then a timeout, BUT, it does subscribe me successfully, is anyone else seeing this?

I am getting a Cross-Origin Read Blocking (CORB) issue in my console, i wonder if that is blocking.

Thanks

How to integrate v-text-field instead of input element?

I'm using vue3 and trying to replace the input element with a fancy v-text-field.
However, my try did not work.

		<template v-slot="{ subscribe, setEmail, error, success, loading }">
		<form @submit.prevent="subscribe">
			<v-text-field
			label="Your email address"
			:rules="rules"
			hide-details="auto"
			@input="setEmail($event.target.value)"
			></v-text-field> -->
			<button type="submit"><v-icon>mdi-email</v-icon></button>
			<div v-if="error">{{ error }}</div>
			<div v-if="success">Sucessfully subscribed!</div>
			<div v-if="loading">Loading…</div>
		</form>
		</template>

Error:
"TypeError: Cannot read property 'value' of undefined"

I would be happy if you can provide advice.

Mailchimp doc

any documentation about how to get the url, list id & user-id ?

Possible to add language so on french website i signup users with right langage.

import r from 'jsonp'
import s from 'query-string'

export default {
  props: {
    url: {
      required: !0,
      type: String
    },
    userId: {
      required: !0,
      type: String
    },
    listId: {
      required: !0,
      type: String
    },
    language: {
      required: !0,
      type: String
    }
  },
  data: function () {
    return {
      email: null,
      success: !1,
      error: null,
      loading: !1
    }
  },
  computed: {
    data: function () {
      return s.stringify({
        u: this.userId,
        id: this.listId,
        EMAIL: this.email,
        LANGUAGE: this.language
      })
    }
  },
  methods: {
    setEmail: function (r) {
      void 0 === r && (r = ''), this.email = r.trim()
    },
    subscribe: function () {
      null === this.email || this.loading || (this.success = !1, this.error = null, this.loading = !0, r(this.url + '?' + this.data, { param: 'c' }, this.onResponse))
    },
    onResponse: function (r, s) {
      this.loading = !1, r && (this.error = r), s && 'error' === s.result && (this.error = this.formatErrorMessage(s.msg)), this.error ? this.$emit('error', this.error) : (this.success = !0, this.email = null, this.$emit('success'))
    },
    formatErrorMessage: function (r) {
      return r.replace('0 - ', '')
    }
  },
  render: function () {
    return this.$scopedSlots.default({
      subscribe: this.subscribe,
      setEmail: this.setEmail,
      error: this.error,
      success: this.success,
      loading: this.loading
    })
  }
}
//# sourceMappingURL=vue-mailchimp-subscribe.mjs.map

and on component

<mailchimp-subscribe
    url="https://xxxxxxxxxxxxx.us1.list-manage.com/subscribe/post-json"
    user-id="xxxxxxxxx"
    list-id="xxxxxxxxxx"
    language="fr_CA"
  >

Add support for additional fields

Add the ability to subscribe with additional fields - not just email.

I have forms that collect city, state, business name, etc.

Possibly change function from setEmail to setField('EMAIL')

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.