Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #107067

    Helga S
    Participant

    Hi there.

    On my homepage: When I add a text box with some html code for my email signup/subscription to mad mimi, I cannot see the rest of my homepage content in visual composer.

    My url is: my URL is http://womanofworth.academy

    Below is the code that I am getting from Mad Mimi for the form. It all looks good on the actual site but I just can’t edit any of the rest of my content when this is in. When I delete this code, it all works again. What could be the problem please?

    Thank you.

    ________

    <form id=”mad_mimi_signup_form” accept-charset=”UTF-8″ action=”https://madmimi.com/signups/subscribe/118615″ method=”post” target=”_blank”>
    <div style=”margin: 0; padding: 0; display: inline;”><input name=”utf8″ type=”hidden” value=”✓” /></div>
    <div class=”mimi_field required” style=”text-align: center;”><label for=”signup_email”>Email*</label><input id=”signup_email” name=”signup[email]” type=”text” placeholder=”you@example.com” data-required-field=”This field is required” /></div>
    <div class=”mimi_field required” style=”text-align: center;”><label for=”signup_first_name”>First Name*</label><input id=”signup_first_name” name=”signup[first_name]” type=”text” data-required-field=”This field is required” /></div>
    <div style=”text-align: center;”><input id=”webform_submit_button” class=”submit” type=”submit” value=”YES PLEASE, I want access NOW” data-default-text=”Subscribe” data-submitting-text=”Sending…” data-invalid-text=”↑ You forgot some required fields” data-choose-list=”↑ Choose a list” /></div>
    </form><script type=”text/javascript”>// <![CDATA[
    (function() {
    var form = document.getElementById(‘mad_mimi_signup_form’),
    submit = document.getElementById(‘webform_submit_button’),
    validEmail = /.+@.+\..+/,
    isValid;

    form.onsubmit = function(event) {
    validate();
    if(!isValid) {
    revalidateOnChange();
    return false;
    }
    };

    function validate() {
    isValid = true;
    emailValidation();
    fieldAndListValidation();
    updateFormAfterValidation();
    }

    function emailValidation() {
    var email = document.getElementById(‘signup_email’);
    if(!validEmail.test(email.value)) {
    textFieldError(email);
    isValid = false;
    } else {
    removeTextFieldError(email);
    }
    }

    function fieldAndListValidation() {
    var fields = form.querySelectorAll(‘.mimi_field.required’);
    for(var i = 0; i < fields.length; ++i) { var field = fields[i], type = fieldType(field); if(type == ‘checkboxes’ || type == ‘radio_buttons’) { checkboxAndRadioValidation(field); } else { textAndDropdownValidation(field, type); } } } function fieldType(field) { var type = field.querySelectorAll(‘.field_type’); if(type.length > 0) {
    return type[0].getAttribute(‘data-field-type’);
    } else if(field.className.indexOf(‘checkgroup’) >= 0) {
    return ‘checkboxes’;
    } else {
    return ‘text_field’;
    }
    }

    function checkboxAndRadioValidation(field) {
    var inputs = field.getElementsByTagName(‘input’),
    selected = false;
    for(var i = 0; i < inputs.length; ++i) {
    var input = inputs[i];
    if((input.type == ‘checkbox’ || input.type == ‘radio’) && input.checked) selected = true;
    }
    if(selected) {
    field.className = field.className.replace(/ invalid/g, ”);
    } else {
    if(field.className.indexOf(‘invalid’) == -1) field.className += ‘ invalid’;
    isValid = false;
    }
    }

    function textAndDropdownValidation(field, type) {
    var inputs = field.getElementsByTagName(‘input’);
    for(var i = 0; i < inputs.length; ++i) { var input = inputs[i]; if(input.name.indexOf(‘signup’) >= 0) {
    if(type == ‘text_field’) {
    textValidation(input);
    } else {
    dropdownValidation(field, input);
    }
    }
    }
    htmlEmbedDropdownValidation(field);
    }

    function textValidation(input) {
    if(input.id == ‘signup_email’) return;
    var val = input.value;
    if(val == ”) {
    textFieldError(input);
    isValid = false;
    return;
    } else {
    removeTextFieldError(input)
    }
    }

    function dropdownValidation(field, input) {
    var val = input.value;
    if(val == ”) {
    if(field.className.indexOf(‘invalid’) == -1) field.className += ‘ invalid’;
    onSelectCallback(input);
    isValid = false;
    return;
    } else {
    field.className = field.className.replace(/ invalid/g, ”);
    }
    }

    function htmlEmbedDropdownValidation(field) {
    var dropdowns = field.querySelectorAll(‘.mimi_html_dropdown’);
    for(var i = 0; i < dropdowns.length; ++i) {
    var dropdown = dropdowns[i],
    val = dropdown.value;
    if(val == ”) {
    if(field.className.indexOf(‘invalid’) == -1) field.className += ‘ invalid’;
    isValid = false;
    dropdown.onchange = validate;
    return;
    } else {
    field.className = field.className.replace(/ invalid/g, ”);
    }
    }
    }

    function textFieldError(input) {
    input.className = ‘required invalid’;
    input.placeholder = input.getAttribute(‘data-required-field’);
    }

    function removeTextFieldError(input) {
    input.className = ‘required’;
    input.placeholder = ”;
    }

    function onSelectCallback(input) {
    if(typeof Widget != ‘undefined’ && Widget.BasicDropdown != undefined) {
    var dropdownEl = input.parentNode,
    instances = Widget.BasicDropdown.instances;
    for(var i = 0; i < instances.length; ++i) { var instance = instances[i]; if(instance.wrapperEl == dropdownEl) { instance.onSelect = validate; } } } } function updateFormAfterValidation() { form.className = setFormClassName(); submit.value = submitButtonText(); submit.disabled = !isValid; submit.className = isValid ? ‘submit’ : ‘disabled’; } function setFormClassName() { var name = form.className; if(isValid) { return name.replace(/\s?mimi_invalid/, ”); } else { if(name.indexOf(‘mimi_invalid’) == -1) { return name += ‘ mimi_invalid’; } else { return name; } } } function submitButtonText() { var invalidFields = document.querySelectorAll(‘.invalid’), text; if(isValid || invalidFields == undefined) { text = submit.getAttribute(‘data-default-text’); } else { if(invalidFields.length > 1 || invalidFields[0].className.indexOf(‘checkgroup’) == -1) {
    text = submit.getAttribute(‘data-invalid-text’);
    } else {
    text = submit.getAttribute(‘data-choose-list’);
    }
    }
    return text;
    }

    function revalidateOnChange() {
    var fields = form.querySelectorAll(“.mimi_field.required”);
    for(var i = 0; i < fields.length; ++i) {
    var inputs = fields[i].getElementsByTagName(‘input’);
    for(var j = 0; j < inputs.length; ++j) { inputs[j].onchange = validate; } } } })();
    // ]]></script>

    #107080

    Christopher
    Moderator

    Hi there,

    When you are using VC as editor you should stick with it and do not switch between VC and Classic editor that cause problem.

    Hope that helps.

    #107118

    Helga S
    Participant

    This response doesn’t help me at all because I cannot see my homepage content in VC to be able to edit it. The code above is what I see when I look at that specific text box so I could paste it in there. I am not using classic editor.

    What do I do now. I am stuck and unable to further develop my website.

    Has someone actually had a look at the problem?

    When I go to VC to edit, it just shows “loading, please wait” and has been doing that all morning.

    Thanks

    #107119

    Helga S
    Participant

    When I go to VC to edit, it just shows “loading, please wait” and has been doing that all morning.

    #107125

    Mrinal
    Member

    Hi Helga,

    Thanks for writing in!

    At first please update your theme to latest version 2.4.0 by following this KB article: Updating Your Theme and Plugins

    Currently you’re using too old version of X theme Version: 1.8.4, which is no longer compatible with latest WordPress

    #109144

    Helga S
    Participant

    Hi there. I followed the instructions from the link you sent me. Downlaoded the files for X (folder) and uploaded them to /wp-content/themes/.

    However, it seems nothing has changed and my x-theme still shows 1.8.4.

    Does it have something to do with the fact that I am us using the child theme?

    Help please.

    Thanks.

    #109249

    Rad
    Moderator

    Hi Helga,

    Not sure what went wrong, but I’d like to check it personally. Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks!