DHTMLX Docs & Samples Explorer

onBeforeChange

Event occurs before data in some input changed ( by user actions )
Event works for constructed input elements only

Parameters for inputs:

  • an item id
  • an existing value
  • a new value
myform.attachEvent("onBeforeChange", function (id, old_value, new_value){
    //any custom logic here
return true;
});

Returning false from the event handler will cancel value changing (onChange won't be called after this).

See also: onChange, onInputChange