There is a form identified by the id property as ‘jogokform’. The form designed for create and modify user group, password and username of users. I want to create a dataprocessor for the form …
var dpJogok = new dhx.DataProcessor({
master:$$('jogokform'),
autoupdate:false,
url:"dsDolgozoJogok.php"
});
… because I must check some fields server side, for example reserved usernames.
But for the code above I get following error:
DataProcessor designed to works with collections of data, so it will not work with form.
Normally you need not complex state processing for form and can use
dhx.ajax().post("some.php", $$('form').getValues(), function(text){
if (text == "invalid") //just for example
show_message_to_user();
});
Above syntax can be used with connector script ( if you are using it ) docs.dhtmlx.com/doku.php?id=dhtm … _changes&s[]=simple&s[]=form
If you really want to use dataprocessor, you can create a dhx.DataCollection, init dataprocessor with master pointing to data-collection and bind form to data-collection. (form.save() will push data back to data-collection, which will trigger related actions of dataprocessor) - but it looks as over-complicated scheme for your use-case.