Change MailChimp's success/error message

后端 未结 2 2228
无人共我
无人共我 2021-02-20 07:46

I can\'t find this anywhere. Can anyone who\'s familiar with MailChimp advise?

I\'ve embed my form/input and there\'s some empty div\'s (below) which have error/success

2条回答
  •  旧时难觅i
    2021-02-20 08:45

    A programatic way to do it is with some 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);
    

    Got that code from here.

提交回复
热议问题