Home Forums Newsletter Plugin Support Form Extra Profile Fields

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #25400
    zeroluca
    Participant

    Hi, i need some help about form fields of my newsletter.
    Besides the usual fields expected from the newsletter’s form (email, name, lasta name, gender) I entered another Extra field called COUNTRY (option list).
    So i have customize my form with a new script > attached below(form 1).

    My form looks ok on my newsletter page but when i do a subscription test the value “country” does not return.
    Could someone help me ?

    Thanks Luca

    <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>

    <div class=”newsletter newsletter-subscription”>
    <form method=”post” action=”http://www.ricamificiolevi.com/?na=s&#8221; onsubmit=”return newsletter_check(this)”>

    <table cellspacing=”0″ cellpadding=”3″ border=”0″>

    <!– first name –>
    <tr>
    <th>Name</th>
    <td><input class=”newsletter-firstname” type=”text” name=”nn” size=”30″></td>
    </tr>

    <!– last name –>
    <tr>
    <th>Last name</th>
    <td><input class=”newsletter-lastname” type=”text” name=”ns” size=”30″></td>
    </tr>

    <!– email –>
    <tr>
    <th>Email</th>
    <td align=”left”><input class=”newsletter-email” type=”email” name=”ne” size=”30″ required></td>
    </tr>

    <!– country –>
    <tr>
    <th>Country</th>
    <td>
    <select name=”np1″>
    <option value=””>select your country…</option>
    <option value=”AF”>Afghanistan</option>
    <option value=”AL”>Albania</option>
    <option value=”DZ”>Algeria</option>
    “etc.etc.etc.”</select>
    </td>
    </tr>

    <tr>
    <td colspan=”2″ class=”newsletter-td-privacy”>
    <input type=”checkbox” name=”ny” required> Subscribing I accept the privacy rules of this site
    </td>
    </tr>

    <tr>
    <td colspan=”2″ class=”newsletter-td-submit”>
    <input class=”newsletter-submit” type=”submit” value=”Subscribe”/>
    </td>
    </tr>

    </table>
    </form>
    </div>

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.