validate data at serverside


I build a small form and want to validate data at serverside.
-loading data via xml seems to work fine.
-when i press ‘save’ it does not send all fields (only these 2: [object Object]&ids=340 )


I used this script in htmlpage:

	var myForm, mygrid, formData;
	function doOnLoad() {
		formData = [
			{type: "settings", position: "label-left", labelWidth: 120, inputWidth: 160},
			{type: "label", label: "Persoon"},
			{type: "input", name: "OBJECTS_ID", label: "Objects_ID", value: "", validate:"NotEmpty"},
			{type: "input", name: "CommonName", label: "Gebruikersnaam", value: "", validate:"NotEmpty"},
			{type: "input", name: "LoginName", label: "Loginnaam", value: "", validate:"NotEmpty"},
			{type: "input", name: "PersonalNumber", label: "PersonalNumber", value: ""},
			{type: "password", name: "LoginPassword", label: "LoginPassword", value: ""},
			{type: "calendar", dateFormat: "%Y-%m-%d %H:%i", name: "FromTime", label: "FromTime", value: ""},
			{type: "input", name: "UntilTime", label: "UntilTime", value: ""},
			{type: "label", label: "Profielen"},
			{type: "select", label: "Role_ID", options:[
				{text: "Operators", value: "1"},
				{text: "TD", value: "2", selected: true},
				{text: "Management", value: "3"},
				{text: "Administrators", value: "4"}
			{type: "button", value: "Load via obj_conn", name: "set1"},
			{type: "button", value: "Load via dhtmlx conn", name: "set2"},
			{type: "button", value: "Save", name: "send"}
		myForm = new dhtmlXForm("myForm", formData);
		myForm.attachEvent("onButtonClick", function(id){ 
			if (id == "set1") 
			if (id == "set2") 
			if (id == "send"); 
		var dp = new dataProcessor('test_conn.php');


there was a problem with sending calendar date. Please try to use attached libraries instead of the originals. (1.98 KB) (14.9 KB)

Dear Support,

I found the bug was in :; should be =>;

Now i try to send a custom message from php server side:

PHP code:
header(‘Content-Type: text/xml’);
echo ’ ‘.$Message.’’;

js code (in combination with dhtmlxform) :
function my_action(node){
alert(node.getAttribute(“type”)); // my_error
alert(; // Details
return false;
var dp = new dataProcessor(’/update.php?id=292’);

This does not give an error but i don’t get to see the message, any idea how to fix this?!


Unfortunately we cannot reproduce this issue locally. Make sure if you are using:


Dear Support,

The updated calender files solve one problem with date format send back to the server, thx.

But when i empty the calendar date field by hand, the value send to the server stays the old value (instead of empty field).


Problem was confirmed and fixed.

Please try to use attached js file instead of original one
(the same fix will be added to the next version of component) (1.18 KB) (15.2 KB)