View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

displaying too many error messages at one time to fields I added

Thread began 7/24/2009 2:58 pm by skyll237680 | Last modified 7/24/2009 4:25 pm by skyll237680 | 3480 views | 16 replies

skyll237680

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>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...