Is it possible to data-bind a form submit? I know how to bind on button click but I would like to know if I can bind for form submit e.g <form data-bind='submit: handleSubmit'></form>.
kendo.data.binders.submit = kendo.data.Binder.extend({
init: function (element, bindings, options) {
//call the base constructor
kendo.data.Binder.fn.init.call(this, element, bindings, options);
var self = this;
//listen for the submit event of the element
$(self.element).on("submit", function () {
return self.submit(); //call the submit function
});
},
refresh: function () {
},
submit: function () {
this.bindings["submit"].get();
returnfalse;
}
});