Form not sending hidden fields after first send

I have a form that I use a grid to populate the form by choosing the selected itemto populate. When I send the form to the php the first time Im good and the record deletes. If I choose another record and try to delete it the hidden fields do not get sent to the php file.

var selectedItem = locgrid.getSelectedRowId();
if (locForm)
{
return;
}
else
{

var formData = [
			{type: "settings", position: "label-left", labelWidth: 100, inputWidth: 120},
			{type: "fieldset", label: "Locations", inputWidth: "auto", list:[
				{type: "input", label: "Name", name: "Name", value: ""},
				{type: "hidden", label: "switch", name:"switch", value: "3"},
				{type: "hidden", label: "usrid", name:"usrid", value: "7000"},
				{type: "hidden", label: "cmpid", name:"cmpid", value: "5000"},
				{type: "hidden", label: "Table", name:"Table", value: "Location"},
				{type: "newcolumn"},					
				{type: "button", value: "Save", name: "save"},
				{type: "newcolumn"},					
				{type: "button", value: "Delete", name: "del"}
			]}
		];


			
		locForm = new dhtmlXForm("loc_Form", formData);
		locForm.setSkin("dhx_skyblue");
		locForm.load("php/data_location.php?id=" + selectedItem);
		//var Formdp = new dataProcessor("php/data_location.php");
		//Formdp.init(myForm);
		
		locForm.attachEvent("onButtonClick", function(id){
 			
 			if(id=="save")
 			{
 			//locForm.save();
			locForm.send("php/sqladdloc.php");
			locForm.clear();
			locForm.reset();
			doInitGrid(); 
		}
		else
		{
		//locgrid.deleteRow(selectedItem);
		locForm.send("php/del.php");
		//locForm.clear();
		//locForm.reset();
		doInitGrid(); 
		}
 			});

}

function doOnRowSelected1()

{

var selectedItem = locgrid.getSelectedRowId();
locForm.load("php/data_location.php?id=" + selectedItem);

}

locgrid = new dhtmlXGridObject(‘locgrid_container’);
locgrid.setImagePath(“dhtmlx/dhtmlxgrid/codebase/imgs/”);
locgrid.setHeader(“Name”);
locgrid.setInitWidths("*");
locgrid.setColAlign(“left”);
locgrid.setSkin(“light”);
locgrid.setColumnIds(“Name”);
locgrid.load(“php/connector_loc.php”);
locgrid.init();
locgrid.attachEvent(“onRowSelect”, doOnRowSelected1);
var locdp = new dataProcessor(“php/connector_loc.php”);
locdp.init(catgrid);
locdp.setUpdateMode(“cell”,true)
locdp.setDataColumns(“true”);

hi

please provide completed demo or direct link

Here is the demo After loading cat.php Press the add edit button Select a member of the grid hit delete. That member will delete. Select another member of the grid and select delete again this member will not delete. If you debug the del.php file you will see the hidden fields do not populate the PHP

Thanks in advance
Inv.zip (1.78 MB)

Here is the backup of the database

Again thanks
DB.zip (252 KB)

may not have included this

Thanks
global_vars.zip (237 Bytes)

Andrei
did you get a chance to look at this???

Thanks

Hello

there is some problems with your demo localy
could you please provide direct link?

I dont have a link What problem are you having locally

I hot have ready mssql instance

No Problem. I found the issue When you do a form.clear() it clears the hidden values also…

Does the myForm.updateValues() work?? I get its not supported

Thanks

yes should work