Save

</> Source
<!DOCTYPE html>
<html>
<head>
	<title>Save</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script src="php/connector/dhtmlxdataprocessor.js"></script>
	<script>
		var myForm, formData;
		var dp;
		function doOnLoad() {
			formData = [
				{type: "settings", position: "label-left", labelWidth: 100, inputWidth: 120},
				{type: "fieldset", label: "Welcome", inputWidth: "auto", list:[
					{type: "input", label: "Package", name: "Package", value: ""},
					{type: "input", label: "Version", name: "Version", value: ""},
					{type: "input", label: "Maintainer", name: "Maintainer", value: ""},
					{type: "input", label: "Size", name: "Size", value: ""},
					{type: "button", value: "Load set 1", name: "set1"},
					{type: "button", value: "Load set 2", name: "set2"},
					{type: "button", value: "Load set 3", name: "set3"},
					{type: "button", value: "Save", name: "send"}
				]}
			];
			myForm = new dhtmlXForm("myForm", formData);
			myForm.load("php/data.php?id=1");
			
			myForm.attachEvent("onButtonClick", function(id){
				if (id == "set1") myForm.load("php/data.php?id=1");
				if (id == "set2") myForm.load("php/data.php?id=2");
				if (id == "set3") myForm.load("php/data.php?id=5");
				if (id == "send") myForm.save();
			});
			
			dp = new dataProcessor("php/data.php");
			dp.init(myForm);
		}
	</script>
</head>
<body onload="doOnLoad();">
	<div id="myForm"></div>
</body>
</html>

Documentation

Check documentation to learn how to use the components and easily implement them in your applications.