form text field and encoded with htmlspecialchars string

I have strings in database which is encoded by htmlspecialchars and mysqli_real_escape_string php functions.
This strings are displays in datatable normally (decoded), but when I show window with binded form of selected record of datatable, encoded string in text field is showed with html special chars. Why two components behave different. How can I display encoded string in text field of form.

Thank you.

Hello,

both datatable and form behave correctly. Please take a look at the example:

http://webix.com/snippet/3f062a92

input always displays value as is.

If you need to customize bind data, you can set the 3rd parameter of bind() method - the function that takes item data as a parameter and returns formatted data:

var unescape = {
    "&":"&",
    "<":"<",
    ...
};

$$('form').bind('datatable', null, function(data){
    if(data){
	for(var key in data)
	    for(var char in unescape ){
		var rx = new RegExp(char,"g");
		data[key] = data[key].toString().replace(rx, unescape[char]);
	    }
    }
    return data;
});

Also you will need to define data scheme for datatable to escape updated values:

http://docs.webix.com/desktop__data_scheme.html