Subscribe

<div class="content well"><h3>Sign up to receive my slightly erratic, sort-of-weekly Pic of the Week e-prezzie!</h3>


<div class="error"><span class="required text-danger">* required fields are marked red</span></div>


<script language="Javascript" type="text/javascript">

function checkform()
{
  for (i=0;i<fieldstocheck.length;i++) {
    if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].type") == "checkbox") {
      if (document.subscribeform.elements[fieldstocheck[i]].checked) {
      } else {
        alert("The following field is required:  "+fieldnames[i]);
        eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()");

        return false;
      }
    } else {
      if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].value") == "") {
        alert("Please enter your "+fieldnames[i]);
        eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()");

        return false;
      }
    }
  }
  for (i=0;i<groupstocheck.length;i++) {
    if (!checkGroup(groupstocheck[i],groupnames[i])) {
      return false;
    }
  }

  if (! compareEmail()) {
    alert("Email addresses you entered do not match");

    return false;
  }
  if (! checkEmail()) {
    alert("Email address is not valid");

    return false;
  }

  return true;
}

var fieldstocheck = new Array();
var fieldnames = new Array();
function addFieldToCheck(value,name)
{
  fieldstocheck[fieldstocheck.length] = value;
  fieldnames[fieldnames.length] = name;
}
var groupstocheck = new Array();
var groupnames = new Array();
function addGroupToCheck(value,name)
{
  groupstocheck[groupstocheck.length] = value;
  groupnames[groupnames.length] = name;
}

function compareEmail()
{
  return (document.subscribeform.elements["email"].value == document.subscribeform.elements["emailconfirm"].value);
}

function checkEmail()
{
  var re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    return re.test(document.subscribeform.elements["email"].value);
}

function checkGroup(name,value)
{
  option = -1;
  for (i=0;i<document.subscribeform.elements[name].length;i++) {
    if (document.subscribeform.elements[name][i].checked) {
      option = i;
    }
  }
  if (option == -1) {
    alert ("Please enter your "+value);

    return false;
  }

  return true;
}

</script><form method="post" action="" name="subscribeform"><table class="jumbotron table">
  <tbody><tr><td><div class="required text-danger"><label for="email">Email address *</label></div></td>
  <td class="attributeinput"><input type="text" name="email" required="required" placeholder="" size="40" id="email" class="form-control">
  <script language="Javascript" type="text/javascript">addFieldToCheck("email","Email address");</script></td></tr>
  <tr><td><div class="required text-danger"><label for="confirm">Confirm your email address *</label></div></td>
  <td class="attributeinput"><input type="text" name="emailconfirm" required="required" value="" size="40" id="confirm" class="form-control">
  <script language="Javascript" type="text/javascript">addFieldToCheck("emailconfirm","Confirm your email address");</script></td></tr><input type="hidden" name="htmlemail" value="1">

<tr><td><div class="required text-danger"><label for="attribute1">First Name *</label></div></td><td class="attributeinput">
            <input type="text" name="attribute1" class="attributeinput form-control" size="40" value="" id="attribute1"><script language="Javascript" type="text/javascript">addFieldToCheck("attribute1","First Name");</script></td></tr>

<tr><td><div class="required text-danger"><label for="attribute2">Last Name *</label></div></td><td class="attributeinput">
            <input type="text" name="attribute2" class="attributeinput form-control" size="40" value="" id="attribute2"><script language="Javascript" type="text/javascript">addFieldToCheck("attribute2","Last Name");</script></td></tr>

<tr><td><div class="attributename"><big><label for="attribute3">Where in the world are you?</label></big></div></td><td class="attributeinput">
            <input type="text" name="attribute3" class="attributeinput form-control" size="40" value="" id="attribute3"></td></tr>

<tr><td><div class="attributename"><big><label for="attribute4">How did you hear about Pic of the Week?</label></big></div></td><td class="attributeinput">
            <input type="text" name="attribute4" class="attributeinput form-control" size="40" value="" id="attribute4"></td></tr>
</tbody></table><input type="hidden" name="list[2]" value="signup"><input type="hidden" name="listname[2]" value="Pic of the Week"><div style="display:none"><input type="text" name="VerificationCodeX" value="" size="20" class="form-control"></div><input type="submit" name="subscribe" value="Subscribe to the Pic of the Week" onclick="return checkform();" class="btn btn-primary"> &nbsp;&nbsp; <a href="https://andynixpix.co.za/picoftheweek/?p=unsubscribe&amp;id=2">Unsubscribe</a></form><p class="poweredby" style="text-align:center"><a href="https://www.phplist.com/poweredby?utm_source=pl3.6.0&amp;utm_medium=poweredhostedimg&amp;utm_campaign=phpList" title="visit the phpList website"><img src="https://d3u7tsw7cvar0t.cloudfront.net/images/3.6.0/power-phplist.png" title="powered by phpList version 3.6.0, © phpList ltd" alt="powered by phpList 3.6.0, © phpList ltd" border="0"></a></p></div>