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 | 3453 views | 16 replies


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

I am having a terrible time adding extra form fields to the contact form and applying the validations to my new fields to display error messages correctly. Here is a link to the uploaded contact form: contact.php

For client side spry validations, all the new fields I added display multiple error messages. How do I make it only display the pertinent error message onblur here instead of mulitple error messages on each of the fields that I added?

For server side validations only the phone number text field displays error messages wrong. There are two possible error messages on the phone number text field; one that says "A value is required." if nothing was entered, and a second one that says "Invalid format, please re-enter your phone number." The problem is that if nothing is entered, both error messages appear when the form is submitted; the second message about invalid format should not appear in this case. How do I make it only display the first error message and not the invalid format message, if they have simply neglected to enter anything at all here?

$WAFV_Redirect = "";
$_SESSION['WAVT_contact_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ(((isset($_POST["Contact_Name"]))?$_POST["Contact_Name"]:"") . "",true,1);
$WAFV_Errors .= WAValidateEM(((isset($_POST["Email_address"]))?$_POST["Email_address"]:"") . "",true,2);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["Comments"]))?$_POST["Comments"]:"") . "",true,3);
$WAFV_Errors .= WAValidateLE(((isset($_POST["Security_code"]))?strtolower($_POST["Security_code"]):"") . "",((isset($_SESSION["captcha_1"]))?strtolower($_SESSION["captcha_1"]):"") . "",true,4);
$WAFV_Errors .= WAValidateLE(((isset($_POST["Security_question"]))?strtolower($_POST["Security_question"]):"") . "",((isset($_SESSION["random_answer"]))?strtolower($_SESSION["random_answer"]):"") . "",true,5);
$WAFV_Errors .= WAValidateRX(((isset($_POST["addblock"]))?$_POST["addblock"]:"") . "","/^$/i",false,6);
$WAFV_Errors .= WAValidateRX(((isset($_POST["seconddblock"]))?$_POST["seconddblock"]:"") . "","/^$/i",false,7);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["company_name"]))?$_POST["company_name"]:"") . "",false,8);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["address"]))?$_POST["address"]:"") . "",false,9);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["city"]))?$_POST["city"]:"") . "",false,10);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["zip"]))?$_POST["zip"]:"") . "",false,11);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["phone"]))?$_POST["phone"]:"") . "",true,12);
$WAFV_Errors .= WAValidatePN(((isset($_POST["phone"]))?$_POST["phone"]:"") . "",true,false,true,13);

if ($WAFV_Errors != "") {

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





Ease of use


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