Home Forums Newsletter Plugin Support Blank page that says Wrong email when using shortcode

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #25604
    Anonymous
    Inactive

    Im having an issue with the error messages when I sign up a form without filling out any of the input boxes for Name and Email. It works fine on my desktop, just not mobile.

    My website is setup in Reading Settings as a a static page with Front page being Home and Posts page being blog.

    When I add this shortcode on the home page:
    [newsletter_form]

    It works fine with a popup that says “The email is not correct” with a close link.

    When I add this shortcode on the same page:

    [newsletter_form]
    [newsletter_field name="first_name"]
    [newsletter_field name="email"]
    [/newsletter_form]

    It goes to a blank page that says “Wrong email”.

    Can anyone help?

    Also how do I add value=“name” or value=“email” to the shortcodes so I don’t have the labels on top input box? And how do I validate that the user needs to fill out their name?

    #25630
    Stefano
    Keymaster

    It seems a form problem, I need to see it in your site to find out the problem.

    Stefano.

    #25647
    Anonymous
    Inactive

    Thanks for the reply back. Here is my dev link:
    goo.gl/TgToAZ

    I see its missing onsubmit=”return newsletter_check(this)” on the form element. Maybe that’s causing it?

    and this script is missing too.

    <script type=”text/javascript”>
    //<![CDATA[
    if (typeof newsletter_check !== “function”) {
    window.newsletter_check = function (f) {
    var re = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-]{1,})+\.)+([a-zA-Z0-9]{2,})+$/;
    if (!re.test(f.elements[“ne”].value)) {
    alert(“The email is not correct”);
    return false;
    }
    for (var i=1; i<20; i++) {
    if (f.elements[“np” + i] && f.elements[“np” + i].required && f.elements[“np” + i].value == “”) {
    alert(“”);
    return false;
    }
    }
    if (f.elements[“ny”] && !f.elements[“ny”].checked) {
    alert(“You must accept the privacy statement”);
    return false;
    }
    return true;
    }
    }
    //]]>
    </script>

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
×