use*_*440 4 html forms mailchimp mailchimp-api-v3.0
我在任何地方都找不到。熟悉MailChimp的任何人都可以提出建议吗?
我已经嵌入了表单/输入,并且有一些空的div(下),其中插入了错误/成功消息。
<div id="mce-responses" class="clear">
<div class="response" id="mce-error-response" style="display:none"></div>
<div class="response" id="mce-success-response" style="display:none"></div>
</div>
Run Code Online (Sandbox Code Playgroud)
当我将自定义文本添加到空div时,提交表单时它就会被覆盖,因此很显然,它是从某种方式/位置从MailChimp获取内容的!
有任何想法吗?
jar*_*lff 11
一种编程方式是使用一些 javascript:
// select the target node
var target = document.getElementById('mce-success-response');
// create an observer instance
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if (target.innerHTML === "Thank you for subscribing!") {
target.innerHTML = "Check your email!";
}
});
});
// configuration of the observer:
var config = { attributes: true, childList: true, characterData: true };
// pass in the target node, as well as the observer options
observer.observe(target, config);
Run Code Online (Sandbox Code Playgroud)
从这里得到那个代码。
找到此资源:https :
//kb.mailchimp.com/lists/signup-forms/translate-the-mailchimp-embed-code
mailchimp的经典表单会静态生成成功和错误消息,因此这与语言设置有关。
我已经按照以下步骤完成了自己的表单工作:

