I have a form with two hidden form fields that contain values to be sent to my server program. When I use the getValues() method to post the form the values of the hidden fields are received as empty.
Here is my form. The “session_no” and “request_id” fields are hidden:
{view:"form", id:"taskform", scroll:true, elements:[
{ view:"datepicker", label:"Date", name:"date", id:"date", dateFormat:"%m/%d/%y"},
{ view:"text", label:"Ref", name:"reference", id:"reference"},
{ view: 'input', label: '', type: 'hidden', name: 'session_no', id: 'session_no', value: 'W4DNNE9DBN9EU1F219DRNDR2W',hidden:true},
{ view: 'input', label: '', type: 'hidden', name: 'request_id', id: 'request_id', value: 'MPTASKUPD',hidden:true},
{ view:"textarea", label:"Text", name:"Textarea", inputHeight:'300', inputWidth:'400' }
]
}
Here is the function I’m using to submit the form:
[code]function saveTask() {
var saveTaskURL = “http://pz.southware.com/cgi-nl/NLNET15.BAT”;
dhx.ajax().sync().post(saveTaskURL, $$(‘taskform’).getValues(), function(text, xml, xhr){
if (text.substr(0,2) == "OK") {
$$('taskform').save();
alert("Task Saved"); //debug
showGrid();
};
});
};[/code]
And here is the resulting post string as reported by my server program:
Notice that the values of the session_no and the request_id are empty in the post string.
Please tell me how to get the values of the hidden fields included in the post string.
Thank you.