Set a 'changedByLoad' property value to indicate what triggers the 'onChange' event. Please refer to the code below:
$(function(){
$('#ff').form({
onChange: function(t){
var opts = $(this).form('options');
if (opts.changedByLoad){
console.log(t);
console.log('changedByLoad')
}
},
onLoadSuccess:function(){
var opts = $(this).form('options');
opts.changedByLoad = false;
}
});
var loadForm = $.fn.form.methods.load;
$.extend($.fn.form.methods, {
load: function(jq, param){
return jq.each(function(){
var opts = $(this).form('options');
opts.changedByLoad = true;
loadForm($(this), param);
});
}
});
})