IsRedirectFollowingConstraintFailure()); $postVars = ''; $displayHash["HADPROBLEMS"] = $blHadProblems; if ($blHadProblems) { // preserve POST variables if there were problems $postVars = $objRequest->GetOriginalRequestObjectFollowingConstraintFailure()->GetPostVariables(); $objFailingRequest = $objRequest->GetOriginalRequestObjectFollowingConstraintFailure(); $arConstraintFailures = $objFailingRequest->GetConstraintFailures(); $displayHash["PROBLEMS"] = Array(); for ($i=0; $i<=sizeof($arConstraintFailures)-1; $i++) { $objThisConstraintFailure = &$arConstraintFailures[$i]; $objThisFailingConstraintObject = $objThisConstraintFailure->GetFailedConstraintObject(); $intTypeOfFailure = $objThisFailingConstraintObject->GetConstraintType(); // get the failed parameter in order to customize the error message $failedParam = $objThisConstraintFailure->getParameterName(); switch ($intTypeOfFailure) { case CT_MINLENGTH: switch($failedParam) { case 'services'; $displayHash["PROBLEMS"][] = "Please enter the services or products you are interested in."; break; } break; case CT_MAXLENGTH: switch($failedParam) { case 'services'; $displayHash["PROBLEMS"][] = "The services/products you entered were too long."; break; case 'budget'; $displayHash["PROBLEMS"][] = "The budget you entered was too long."; break; case 'timeline'; $displayHash["PROBLEMS"][] = "The timeline you entered was too long."; break; case 'decisionmakers'; $displayHash["PROBLEMS"][] = "The decision makers you entered was too long."; break; case 'experience'; $displayHash["PROBLEMS"][] = "The experience you entered was too long."; break; case 'comments'; $displayHash["PROBLEMS"][] = "The comments/questions you entered were too long."; break; } break; }; }; }; require_once($strTemplateFile); exit(0); ?>