百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

formchimp

> 数据库
开源

一个可自定义的 MailChimp ajax 插件,适用于 jQuery

99 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个可自定义的 MailChimp ajax 插件,适用于 jQuery

jQuery FormChimp

A customizable MailChimp ajax plugin for jQuery, provides an easy and lightweight way to let your users sign up to your MailChimp list.

Features

  • Customizable Error and Success messages.
  • Ability to specify which element the output should be appended to, if it exists or where the element should be created
  • Automatically transforms the mailchimp signup url in the JSONP format
  • Changes the value of the button if the response is successful
  • This solution is language agnostic, only dependency is jQuery.
  • is AJAX-enabled, but degrades gracefully if Javascript isn't turned on
  • Multiple sign-up forms, for multiple lists.

Install

Choose one of the following methods:

Download source files

  • jquery.formchimp.min.js
  • jquery.formchimp.js

Git clone

bash
git clone https://github.com/fabioquarantini/formchimp.git

Bower

bash
bower install formchimp

Usage

  1. Create a form with the required attributes ( form action and input with name attribute. Where do i find them? )

    xml
    
    
        Email*:
        
        
    
        
    
        Subscribe
    
    
  2. Include jQuery:

    xml
    
    
  3. Include plugin's code:

    xml
    
    
  4. Call the plugin:

    javascript
    $(".form-selector").formchimp();

Settings

FormChimp accepts settings from an object of key/value pairs.

Example:
javascript
$(".form-selector").formchimp({
	key: value,
	key: value
});

List of settings

appendElement:

Selector: Declare where the new element, containing the messages from Mailchimp will be appended to.

Default: $(this)

buttonSelector:

String: Set the button selector.

Default: $form.find('[type="submit"]')

buttonText:

String: The message to be written on the submit button after a successful subscription.

Default: ''

debug:

Boolean: Activate debug message in console.

Default: false

errorMessage:

String: Set custom error message given when return an error.

Default: ''

onMailChimpSuccess:

Function: Callback that fires on MailChimp success.

Default: function() {}

onMailChimpError:

Function: Callback that fires on MailChimp error.

Default: function() {}

responseClass:

Selector: Declare custom element in page for message output. (Set different classes for multiple sign-up forms)

Default: mc-response

successMessage:

String: Set a custom success message.

Default: ''

url:

String: The mailchip list subscription url, to get the JSONP address just change post to post-json and append &c=? at the end.

Default: form action attribute

Event Hooks

These event hooks fire at the same time as their corresponding callbacks (ie. onMailChimpSuccess & onMailChimpSuccess)

mailChimpSuccess : This event is triggered on Mailchip success

mailChimpError : This event is triggered on Mailchip errors

Example:
javascript
$( document ).on( 'mailChimpSuccess', function() {
	// Your code here
});

License

MIT License © Fabio Quarantini

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptajaxformjavascriptjquery

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库