How can I put my Madmimi email catcher in WordPress.com

  • Unknown's avatar

    I want to put a Madmimi email catcher in my WordPress.com blog.
    Please help me do this.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    What is the code? What does it actually do?

  • Unknown's avatar

    wait for a second I will search for the code…

    Madmimi is an autoresponder.
    Where my audience can enter there name as well as there email address.

  • Unknown's avatar

    Hi Raincoaster!
    Here is the code
    <form action=”https://madmimi.com/signups/subscribe/75099″ method=”post” id=”mad_mimi_signup_form” target=”_blank”>
    <fieldset>
    <div class=”mimi_field text email required”>
    <label for=”signup_email”>Email</label>
    <input id=”signup_email” name=”signup[email]” type=”text” placeholder=”(email visible only to moderators and staff)” data-invalid-message=”This field is invalid” class=”required”>
    <div class=”mimi_field_feedback”></div><span class=”mimi_funk”></span>
    </div>
    <div class=”mimi_field text”>
    <label for=”signup_first_name” id=”wf_label”>First Name</label>
    <input id=”signup_first_name” name=”signup[first_name]” type=”text”>
    <div class=”mimi_field_feedback”></div><span class=”mimi_funk”></span>
    </div>
    <div class=”mimi_field action”>
    <input id=”webform_submit_button” value=”Sign up!” type=”submit” class=”submit” data-default-text=”Sign up!” data-submitting-text=”Sending…” data-invalid-text=”↑ You forgot some required fields”>
    </div>
    </fieldset>
    </form>
    <script type=”text/javascript”>
    (function() {
    var form = document.getElementById(“mad_mimi_signup_form”),
    submit = document.getElementById(“webform_submit_button”),
    email = /.+@.+..+/;

    form.onsubmit = function(event) {
    var isValid = validate();
    if(!isValid) {
    for(var i = 0; i < form.elements.length; ++i) {
    var input = form.elements[i];
    if(input.className.indexOf(“required”) >= 0) {
    input.onchange = validate;
    }
    }
    return false;
    }
    if(form.getAttribute(“target”) != “_blank”) {
    form.className = “mimi_submitting”;
    submit.value = submit.getAttribute(“data-submitting-text”);
    submit.disabled = true;
    submit.className = “disabled”;
    }

    setTimeout(function() {
    for(var i = 0; i < form.getElementsByTagName(“input”).length; ++i) {
    var input = form.getElementsByTagName(“input”)[i];
    if(input.getAttribute(“type”) == “text”) {
    input.value = “”;
    }
    if(input.id == “signup_email”) {
    input.placeholder = “(email visible only to moderators and staff)”;
    } else {
    input.placeholder = “”;
    }
    }
    }, 3000);
    };

    function validate() {
    var isValid = true;

    for(var i = 0; i < form.elements.length; ++i) {
    var input = form.elements[i],
    allDivs = input.parentNode.getElementsByTagName(“div”);

    if(input.className.indexOf(“required”) >= 0) {
    if(input.id == “signup_email”) {
    if(!email.test(input.value)) {
    emailErrorMessage(input, allDivs);
    isValid = false;
    } else {
    removeErrorMessage(input, allDivs);
    }
    } else {
    if((input.type == “checkbox” && !input.checked) || input.value == “” || input.value == “-1”) {
    fieldErrorMessage(input, allDivs);
    isValid = false;
    } else {
    removeErrorMessage(input, allDivs);
    }
    }
    }
    }

    form.className = isValid ? “” : “mimi_invalid”;
    submit.value = isValid ? submit.getAttribute(“data-default-text”) : submit.getAttribute(“data-invalid-text”);
    submit.disabled = !isValid;
    submit.className = isValid ? “submit” : “disabled”;

    return isValid;
    }

    function emailErrorMessage(input, allDivs) {
    if(input.getAttribute(“data-webform-type”) == “iframe”) {
    input.className = “required invalid”;
    input.placeholder = input.getAttribute(“data-required-message”) || “This field is required”;
    } else {
    allDivs[0].innerHTML = input.getAttribute(“data-invalid-message”) || “This field is invalid”;
    }
    }

    function fieldErrorMessage(input, allDivs) {
    if(input.getAttribute(“data-webform-type”) == “iframe”) {
    input.className = “required invalid”;
    input.placeholder = input.getAttribute(“data-required-message”) || “This field is required”;
    } else {
    for(var i = 0; i < allDivs.length; ++i) {
    var element = allDivs[i];
    if(element.className.indexOf(“mimi_field_feedback”) >= 0) {
    return element.innerHTML = input.getAttribute(“data-required-message”) || “This field is required”;
    }
    }
    }
    }

    function removeErrorMessage(input, allDivs) {
    if(input.getAttribute(“data-webform-type”) == “iframe”) {
    input.className = “required”;
    }

    for(var i = 0; i < allDivs.length; ++i) {
    var element = allDivs[i];
    if(element.className.indexOf(“mimi_field_feedback”) >= 0) {
    return element.innerHTML = “”;
    }
    }
    }
    })();
    </script>

  • Unknown's avatar

    I’m afraid you won’t be able to use that on a WordPress.com blog. It’s javascript and will be stripped out here for security reasons. Do they supply a plain old HTML code instead?

  • Unknown's avatar

    Hi Raincoaster, thank you for your reply.

    I have 2 more Madmimi code for that email catcher of mine.

    <iframe src=”https://madmimi.com/signups/75165/iframe_embed” scrolling=”no” frameborder=”0″ height=”699″ width=”400″></iframe>

    and this one,

    Sign up!<script type=”text/javascript” src=”https://madmimi.com/signups/75165/webform_side_tab.js”></script>

  • Unknown's avatar

    Neither iframes nor JavaScript can be used on free hosted WordPress.com blogs. http://en.support.wordpress.com/code/

  • Unknown's avatar

    We suggest if you can get an exterior web page of some sort, perhaps a Google Doc or something, that you put the code in there are link to it from your WordPress.com blog.

  • Unknown's avatar

    Hi Timethief, thank you for your attention to my problem.

    Yes I had read that.

    I am just thinking if there is other way I can put my Madmimi embed code in the Text widget?

  • Unknown's avatar

    No, all of the different codes you’ve given us are security risks and will be stripped out.

  • Unknown's avatar

    Hi Raincoaster, thank you for that confirmation. : )
    I guess I really have to try other options.
    Thank you guys for helping me out.

  • Unknown's avatar

    You can use a Contact Form as explained in the Support documents and then manually add them to your Madmimi database?

  • Unknown's avatar

    Hi Raincoaster, how can I do that?
    Where can I go to use a Contact Form?

  • Unknown's avatar

    If you go to the Support documents (in the blue bar at the top of the page) you can type it in and there you go: http://en.support.wordpress.com/?s=Contact+Form

  • Unknown's avatar

    Hi Raincoaster, the information your give me really help.
    Thank you, I will try this out.

    Can I ask one more question?

    In the Text Widget it has this as a description: Arbitrary text or HTML

    So I am thinking what kind of HTML are only allowed to be use?

  • Unknown's avatar

    You can use the same HTML in the text widget as you can on the blog, so images, links, font tags, stuff like that. No javascript, iframes, or similar.

    I usually create my text widgets as if they are draft Posts: I go to Dashboard->Posts->New Posts and create it there, realizing it’ll be narrower because it’s in the sidebar. I put in images and links and so on using the Visual Editor tools and then when it looks right, I click to the Text editor, copy all the code, and post that in the text widget. That makes it easy to tweak the look. And then I save it as a Draft post, so I can change the code whenever I want and insert the new code for the updated version.

  • Unknown's avatar

    Wow. That’s a lot of work and I know it’s worth it.
    Maybe I will try the support doc first.

    Thank you very much Raincoster for your time
    and generosity of sharing our knowledge with me.

  • Unknown's avatar

    It only SOUNDS like a lot of work. Trust me, once you do it you’ll find it much easier than the alternative, which is to write in code.

  • Unknown's avatar

    Hi Raincoaster, thank you for your encourangement.
    Take care.

  • The topic ‘How can I put my Madmimi email catcher in WordPress.com’ is closed to new replies.