Universal Form Validator PHP Support Product Page

This topic is locked
Solved

On Field Change and validate before the form is submitted - Resolved

Reported 27 May 2010 21:45:27
1
has this problem
27 May 2010 21:45:27 Rusty Monette posted:
I am trying to get the UFV to work properly on a website and not having any luck. I have placed it on a form with a insert record as well. The user can insert the record even if the validator says it is not complete. Is there a way to get the validator to work before the form in submitted and inserted into the database? It seems the UFV works if you have the form do nothing else other then validate. I have tried to combine it with the php smart mail extension and the mail will still send even if the validator says it is not complete. Is there a way I can get a copy of the last working version of this extension. I keep updating it with the many updates and seems to be loosing functionality and causing many many problems on my website? I am using the latest version available with php 5

Replies

Replied 05 Jun 2011 15:44:58
05 Jun 2011 15:44:58 andre le tissier replied:
Having the same problem. Tech support please can you respond. Using UFV 1.5.6 on CS4.
The form vaildates unless you add an action to the form.
// Universal Form Validator PHP 1.5.5
$dmxval1 = new dmxValidator();
$dmxval1->script_folder = "ScriptLibrary";
$dmxval1->cs_validate_on_change = true;
$dmxval1->cs_validate_on_submit = true;
$dmxval1->reenable_javascript = true;
$dmxval1->use_bot_check = false;
$dmxval1->report_type = 4;
$dmxval1->error_font =  "Arial";
$dmxval1->error_font_size = 10;
$dmxval1->error_color = "#ff0000";
$dmxval1->error_bold = true;
$dmxval1->error_italic = false;
$dmxval1->error_image = "";
$dmxval1->error_fixed = "Custom";
$dmxval1->error_padding = 4;
$dmxval1->border_color = "#333333";
$dmxval1->border_style = "solid";
$dmxval1->css_error_file = "validatorError2";
$dmxval1->error_bg_color = "#CCCCCC";
$dmxval1->error_preset = "error_two.txt";
$dmxval1->tooltip_position = "top";
$dmxval1->css_hint_file = "validatorHint3";
$dmxval1->hint_preset = "blue.txt";
$dmxval1->hint_tooltip_position = "top";
$dmxval1->hint_border_color = "#0099ff";
$dmxval1->hint_border_style = "solid";
$dmxval1->hint_bg_color = "#003399";
$dmxval1->hint_text_color = "#ffffff";
$dmxval1->hint_text_font = "Arial";
$dmxval1->hint_text_size = 12;
$dmxval1->hint_text_bold = false;
$dmxval1->hint_text_italic = false;
$dmxval1->hint_box_width = 200;
$dmxval1->hint_image = "";
$dmxval1->hint_fixed = "Custom";
$dmxval1->hint_padding = 4;
$dmxval1->use_custom_focus_class = "custom";
$dmxval1->custom_focus_class = "";
$dmxval1->use_custom_valid_class = "custom";
$dmxval1->custom_valid_class = "";
$dmxval1->use_custom_invalid_class = "custom";
$dmxval1->custom_invalid_class = "";
$dmxval1->add_rule("form1", "name", "allformats", ",,", "true", "Please enter your name", "", "", "");
$dmxval1->add_rule("form1", "email", "emailcond", ",,", "true", "Please enter a valid email address", "", "", "");
$dmxval1->add_rule("form1", "telephone", "allformats", ",,", "true", "Please enter a contact number", "", "", "");
$dmxval1->add_hint("form1", "email", "Enter a valid email address here");
$dmxval1->add_hint("form1", "telephone", "Enter your telephone number here");
$dmxval1->add_hint("form1", "name", "Enter your name here");
$dmxval1->validate();

Live page www.marinebedding.co.uk/contact3.php

And the warnings appear incorrectly formatted

Edited by - andre le tissier on 05 Jun 2011  16:50:39


Edited by - andre le tissier on 05 Jun 2011  16:52:59


Edited by - andre le tissier on 12 Jun 2011  10:03:00
Replied 20 Jun 2011 11:31:06
20 Jun 2011 11:31:06 Miroslav Zografski replied:
Hello Andre,

On your page it seems that the jquery-latest.pack.js is comming AFTER some scripts that requires it already to be loaded:
<script type="text/javascript" src="ScriptLibrary/jquery.inputHintBox.js"></script>
<script type="text/javascript" src="ScriptLibrary/jquery.maskedinput-1.2.2.js"></script>
<script type="text/javascript" src="ScriptLibrary/jquery.validate.min.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmx.jquery.validate.js"></script>

<script type="text/javascript" src="ScriptLibrary/jquery.tooltip.min.js"></script>
<script type="text/javascript" src="ScriptLibrary/jquery.hoverIntent.min.js"></script>
<link rel="stylesheet" type="text/css" href="Styles/dmxNavigationMenu.css" />
<!--[if lt IE 7]><script language="javascript" type="text/javascript" src="../Styles/IE7.js"></script><![endif]-->
<!--[if lt IE 7]><script type="text/javascript" src="Styles/IE7.js"></script><![endif]-->
<link rel="stylesheet" type="text/css" href="Styles/dmxNavigationMenu/elegant_blue/elegant_blue.css" />
<script type="text/javascript" src="ScriptLibrary/jsvat.js"></script>
<script language="JavaScript" type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>


Make this to be like:
<script language="JavaScript" type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
<script type="text/javascript" src="ScriptLibrary/jquery.inputHintBox.js"></script>
<script type="text/javascript" src="ScriptLibrary/jquery.maskedinput-1.2.2.js"></script>
<script type="text/javascript" src="ScriptLibrary/jquery.validate.min.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmx.jquery.validate.js"></script>

<script type="text/javascript" src="ScriptLibrary/jquery.tooltip.min.js"></script>
<script type="text/javascript" src="ScriptLibrary/jquery.hoverIntent.min.js"></script>
<link rel="stylesheet" type="text/css" href="Styles/dmxNavigationMenu.css" />
<!--[if lt IE 7]><script language="javascript" type="text/javascript" src="../Styles/IE7.js"></script><![endif]-->
<!--[if lt IE 7]><script type="text/javascript" src="Styles/IE7.js"></script><![endif]-->
<link rel="stylesheet" type="text/css" href="Styles/dmxNavigationMenu/elegant_blue/elegant_blue.css" />
<script type="text/javascript" src="ScriptLibrary/jsvat.js"></script>


Regards,
Replied 20 Jun 2011 22:26:36
20 Jun 2011 22:26:36 andre le tissier replied:
thank you. Now works fine.
regards,
André

Reply to this topic