Here's more of the code, it was too much to copy and paste it all...
This is just the code for the fields I added to the contact form which are giving me the difficulties I described in the previous post:
<label for="company_name">Company Name</label><br />
<span id="sprytextfield5">
<input name="company_name" type="text" id="company_name" onblur="if (document.getElementById('companyServerError')) document.getElementById('companyNameServerError').style.display='none'" value="<?php echo(ValidatedField("contact","company_name")) ?>" />
<span class="textfieldRequiredMsg">A value is required.</span>
</span>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "8" . ",") !== false || "8" == "")) {
if (!(false)) {
?>
<span id="companyServerError" class="textfieldServerError">Please provide your company name.</span>
<?php //WAFV_Conditional contact.php contact(8: )
}
}
}?>
<br />
<label for="address">Address</label><br />
<span id="sprytextfield6">
<input name="address" type="text" id="address" onblur="if (document.getElementById('addressServerError')) document.getElementById('addressNameServerError').style.display='none'" value="<?php echo(ValidatedField("contact","address")) ?>" />
<span class="textfieldRequiredMsg">A value is required.</span>
</span>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "9" . ",") !== false || "9" == "")) {
if (!(false)) {
?>
<span id="addressServerError" class="textfieldServerError">Please provide your address.</span>
<?php //WAFV_Conditional contact.php contact(9: )
}
}
}?>
<br />
<label for="city">City</label><br />
<span id="sprytextfield7">
<input name="city" type="text" id="city" onblur="if (document.getElementById('cityServerError')) document.getElementById('cityNameServerError').style.display='none'" value="<?php echo(ValidatedField("contact","city")) ?>" />
<span class="textfieldRequiredMsg">A value is required.</span>
</span>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "10" . ",") !== false || "10" == "")) {
if (!(false)) {
?>
<span id="cityServerError" class="textfieldServerError">Please provide your city.</span>
<?php //WAFV_Conditional contact.php contact(10: )
}
}
}?>
<br />
<label for="state">State</label><br />
<span id="sprytextfield8">
<input name="state" type="text" id="state" onblur="if (document.getElementById('stateServerError')) document.getElementById('stateNameServerError').style.display='none'" value="<?php echo(ValidatedField("contact","state")) ?>" />
<span class="textfieldRequiredMsg">A value is required.</span>
</span>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "11" . ",") !== false || "11" == "")) {
if (!(false)) {
?>
<span id="stateServerError" class="textfieldServerError">Please provide your state.</span>
<?php //WAFV_Conditional contact.php contact(11: )
}
}
}?>
<br />
<label for="zip">Zip</label><br />
<span id="sprytextfield9">
<input name="zip" type="text" id="zip" onblur="if (document.getElementById('zipServerError')) document.getElementById('zipNameServerError').style.display='none'" value="<?php echo(ValidatedField("contact","zip")) ?>" />
<span class="textfieldRequiredMsg">A value is required.</span>
</span>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "11" . ",") !== false || "11" == "")) {
if (!(false)) {
?>
<span id="zipServerError" class="textfieldServerError">Please provide your zip code.</span>
<?php //WAFV_Conditional contact.php contact(11: )
}
}
}?>
<br />
<label for="phone">Phone Number</label><br />
<span id="sprytextfield10">
<input name="phone" type="text" id="phone" onblur="if (document.getElementById('phoneServerError')) document.getElementById('phoneNameServerError').style.display='none'" value="<?php echo(ValidatedField("contact","phone")) ?>" />
<span class="textfieldRequiredMsg">A value is required.</span>
</span>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "12" . ",") !== false || "12" == "")) {
if (!(false)) {
?>
<span id="phoneServerError" class="textfieldServerError">Please provide your phone number.</span>
<?php //WAFV_Conditional contact.php contact(12: )
}
}
}?>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "13" . ",") !== false || "13" == "")) {
if (!(false)) {
?>
<span id="phoneServerError" class="textfieldServerError">Invalid format, please re-enter your phone number.</span>
<?php //WAFV_Conditional contact.php contact(13: )
}
}
}?>
<script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur"]});
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "email", {validateOn:["blur"]});
var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1", {validateOn:["blur"]});
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {validateOn:["blur"], minChars:<?php echo $WAGLOBAL_Captcha_Characters; ?>, maxChars:<?php echo $WAGLOBAL_Captcha_Characters; ?>});
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {validateOn:["blur"]});
var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "none", {validateOn:["blur"]});
var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6", "none", {validateOn:["blur"]});
var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7", "none", {validateOn:["blur"]});
var sprytextfield8 = new Spry.Widget.ValidationTextField("sprytextfield8", "none", {validateOn:["blur"]});
var sprytextfield9 = new Spry.Widget.ValidationTextField("sprytextfield9", "none", {validateOn:["blur"]});
var sprytextfield10 = new Spry.Widget.ValidationTextField("sprytextfield10", "none", {validateOn:["blur"]});
//-->
</script>